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.3.tar.gz
(11.8 kB
view hashes)
Built Distribution
eks_token-0.1.3-py3-none-any.whl
(12.2 kB
view hashes)
Close
Hashes for eks_token-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92249fe6aff6fac6855bdc906ea2861c6239fb012d73253b6be0ab2817de0e56 |
|
MD5 | c559cce0c84c9c3481de175cb13cdf83 |
|
BLAKE2b-256 | 193a0a4c75efa838ed6c0383a94e1daf1e2a5a8aeaf8154b688e3544d6714e5c |