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.4.tar.gz
(11.8 kB
view hashes)
Built Distribution
eks_token-0.1.4-py3-none-any.whl
(12.2 kB
view hashes)
Close
Hashes for eks_token-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7ca2ccf5dc6181b177faab438f1daf9b4aaf5175fcbeb8c90123de0568465fe |
|
MD5 | 233daab7e51d4f685b4cef634094b02a |
|
BLAKE2b-256 | 6880a4ee58fe1c26558267b355ea51f6ec9467329f5e8760819e525e6a65e6aa |