Skip to main content

sng config

Available

Deployed and supported. The fields and commands described here are stable within version v1alpha1.

sng config manages the CLI's local file: cluster, tenant, API. It touches nothing on the platform side. Not to be confused with sng iam login-page, which sets the sign-in page of your end users.

The file and its keys are described in Configuration.

sng config create​

sng config create

Creates the configuration file if it does not exist. Running the command again has no effect.

config créée : /home/jane/.config/stackngo/config.yaml

sng config show​

sng config show

Shows the current cluster, tenant, and API. Tokens are never displayed.

cluster: ovh-gra-0
tenant: acme-dev
api_url: https://api.dev.stackngo.fr

Without a chosen cluster, the cluster line shows (default): the CLI talks to the default cluster of the API.

sng config use-cluster​

sng config use-cluster NAME

Chooses the cluster sng talks to. The name is checked against the API, then the cluster and the address of its API are saved. Everything you apply afterwards (apply, plan, pull, list, get, edit, delete) targets this cluster and the current tenant.

cluster : ovh-gra-0 (https://api.dev.stackngo.fr)

Error if the name does not exist (unknown cluster …, with the list of available clusters). After switching cluster, run sng sso login again. The STNG_CLUSTER variable overrides the cluster for a single command.

Typical errors​

MessageCause
unknown cluster "…" (available: …)The cluster does not exist: pick one from the list
tenant session required: run sng tenant use NAMENo current tenant: sng tenant use NAME
parse config …The YAML file is corrupted: delete it and start again with sng config create then sng sso login