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 and create a configuration profile for use with external integrations like Github Actions, Terraform and others. The output of the configuration can be generated as either base64 encoded JSON (default), or k8s 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.

$ ksm init default XX:XXXX

ewogICAgImNsaWVudElkIjogInd ... U1R4eUQrU3ZNbkhrMTVLUHRGS2MrZlZJOGtlOUtL==

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.

$ksm init k8s XX:XXXX

apiVersion: v1
data
  config: ewogICAgImNsaWVudElkIjogIml ... dWJsaWNLZXlJZCI6ICIxMCIKfQ==
kind: Secret
metadata:
  name: ksm-config
  namespace: default
type: Opaque

Last updated