Skip to main content

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

CodeQuality Publish stable

logo

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


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.2.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

eks_token-0.2.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file eks_token-0.2.1.tar.gz.

File metadata

  • Download URL: eks_token-0.2.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for eks_token-0.2.1.tar.gz
Algorithm Hash digest
SHA256 acbc747360d003755bec800ddf043ef13589a5e7de626d81837cf398723a20bc
MD5 c98e1c30ddc195a397dd273e4b085be3
BLAKE2b-256 b7a1101b9cd47b44e5687894207129a7f58805a5baad6936b9f0ad02bef84510

See more details on using hashes here.

File details

Details for the file eks_token-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: eks_token-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for eks_token-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31ebbbfb1628d997b29c54ab7c1ad03ecacc06be6bcbc07713415be62bcdb3bb
MD5 d0df0be9c27975a4dfe2b29a404330e5
BLAKE2b-256 2a025a65be58df603d289920f4cd02c7ff22611b1fbd4939b96b80fd2fee9455

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page