Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

"crit create token" returns no output #15

@seaunderwater

Description

@seaunderwater

When creating a bootstrap token using crit create token, no output is returned to the user:

$ crit create token
$

This is inconvenient for the following reasons:

  • There is no indication that the command was successful.
  • The user is left to search for the token using kubectl get secrets. This becomes difficult when there are several tokens:
$  kg secrets
NAME                                             TYPE                                  DATA   AGE
...
bootstrap-signer-token-dzqwn                     kubernetes.io/service-account-token   3      161m
bootstrap-token-8459vn                           bootstrap.kubernetes.io/token         6      4m10s
bootstrap-token-drwuzf                           bootstrap.kubernetes.io/token         6      2m14s
bootstrap-token-epw5fz                           bootstrap.kubernetes.io/token         6      31m
bootstrap-token-otgi8h                           bootstrap.kubernetes.io/token         6      2m3s
bootstrap-token-pxsarz                           bootstrap.kubernetes.io/token         6      3m2s
bootstrap-token-vygvaf                           bootstrap.kubernetes.io/token         6      2m11s
...
  • The user has to base64 decode and concatenate <token-id>.<token-secret>:
$ kg secret bootstrap-token-8459vn -o yaml 
apiVersion: v1
data:
  auth-extra-groups: c3lzdGVtOmJvb3RzdHJhcHBlcnM6Y3JpdDpkZWZhdWx0LW5vZGUtdG9rZW4=
  expiration: MjAzMC0xMC0wNVQxOTozODo1M1o=
  token-id: ODQ1OXZu
  token-secret: eXE0azkzZHhkd3Zxaml2cQ==
  usage-bootstrap-authentication: dHJ1ZQ==
  usage-bootstrap-signing: dHJ1ZQ==
kind: Secret
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions