EKS Token package, an alternate to "aws eks get-token ..." CLI
Project description
eks-token
EKS Token package, an alternate to "aws eks get-token ..." CLI
Usage
Installation
pip install eks-token
Basic usage
from eks_token import get_token
from pprint import pprint
response = get_token(cluster_name='<value>')
pprint(response)
Expected Output
{'apiVersion': 'client.authentication.k8s.io/v1alpha1',
'kind': 'ExecCredential',
'spec': {},
'status': {'expirationTimestamp': '2020-10-01T15:05:17Z',
'token': 'k8s-aws-v1.<token_value>'}}
Extract token from response
from eks_token import get_token
token = get_token(cluster_name='value')['status']['token']
print(token)
Get Token signed for particular IAM role
Pass role_arn argument to the function
from eks_token import get_token
token = get_token(cluster_name='<value>', role_arn='<value>')['status']['token']
print(token)
Contribution
Check our guidelines here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eks_token-0.1.0.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
eks_token-0.1.0-py3-none-any.whl
(12.2 kB
view details)
File details
Details for the file eks_token-0.1.0.tar.gz.
File metadata
- Download URL: eks_token-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eee064c9f6bc1a7bc14c56632dde148376f0af7a3953576e92e3af3e1558b04e
|
|
| MD5 |
72afaeae2771e90363e79fc958185472
|
|
| BLAKE2b-256 |
866ff6798037001d542e348dd5a2433289c9c403d1acda5e19d6815f8745a4b7
|
File details
Details for the file eks_token-0.1.0-py3-none-any.whl.
File metadata
- Download URL: eks_token-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c08cc8143c07053a38723c2327fea2c442d9a7939634e80df9dab3796cb7edb6
|
|
| MD5 |
fdb42a00a012f4e160c1f209e250ccc9
|
|
| BLAKE2b-256 |
f4a259169ae3edf3b9f60824a121079242ba04f3b8576bb035e0bb7057d3638f
|