Init Command
Initialize

init command

Description: Initialize a one time access token
Parameters:
Sub-command to run
format: ksm init <sub-command>
Sub-Commands:
Sub-Command
Description
default
Return the redeemed token as base64 encoded JSON
k8s
Return the redeemed token as Kubernetes secret script.

default

Initialize a one time access token into the default base64 encoded JSON config format. Other KSM Developer SDKs, and applications, will understand configurations in this format.
ksm init default <TOKEN>
optional parameters:
  • --plain do not base64 encode the configuration. Return plain JSON.
  • -h, --hostname change the hostname
  • --skip-ssl-verify - Do not verify the remote SSL certificate.
1
$ ksm init default XX:XXXX
2
3
ewogICAgImNsaWVudElkIjogInd ... U1R4eUQrU3ZNbkhrMTVLUHRGS2MrZlZJOGtlOUtL==
Copied!

k8s

Initialize a one time access token into a Kubernetes secret script.
ksm init k8s <TOKEN>
optional parameters:
  • --name, -n Name of the Kubernetes secret. Default is ksm-config.
  • --namespace, --ns Name of the Kubernetes namespace. Default is default.
  • --apply Automatically use kubectl to apply the secret. You will not see the secret script.
  • --immutable, -i Make the secret immutable. Requires Kubernetes >= 1.21
  • -h, --hostname change the hostname
  • --skip-ssl-verify - Do not verify the remote SSL certificate.
1
$ksm init k8s XX:XXXX
2
3
apiVersion: v1
4
data
5
config: ewogICAgImNsaWVudElkIjogIml ... dWJsaWNLZXlJZCI6ICIxMCIKfQ==
6
kind: Secret
7
metadata:
8
name: ksm-config
9
namespace: default
10
type: Opaque
Copied!
Last modified 3mo ago
Export as PDF
Copy link