diff --git a/cmd/scw/testdata/test-all-usage-k8s-kubeconfig-get-usage.golden b/cmd/scw/testdata/test-all-usage-k8s-kubeconfig-get-usage.golden index 535cf3841a..244e8e9bd4 100644 --- a/cmd/scw/testdata/test-all-usage-k8s-kubeconfig-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-k8s-kubeconfig-get-usage.golden @@ -5,6 +5,10 @@ Retrieve the kubeconfig for a specified cluster. USAGE: scw k8s kubeconfig get [arg=value ...] +EXAMPLES: + Get the kubeconfig for a given cluster + scw k8s kubeconfig get 11111111-1111-1111-1111-111111111111 + ARGS: cluster-id Cluster ID from which to retrieve the kubeconfig [region=fr-par] Region to target. If none is passed will use default region from the config @@ -17,3 +21,7 @@ GLOBAL FLAGS: -D, --debug Enable debug mode -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") -p, --profile string The config profile to use + +SEE ALSO: + # Install a kubeconfig + scw k8s kubeconfig install diff --git a/internal/namespaces/k8s/v1/custom_kubeconfig_get.go b/internal/namespaces/k8s/v1/custom_kubeconfig_get.go index 51255a46a9..e9e14f7aec 100644 --- a/internal/namespaces/k8s/v1/custom_kubeconfig_get.go +++ b/internal/namespaces/k8s/v1/custom_kubeconfig_get.go @@ -32,6 +32,18 @@ func k8sKubeconfigGetCommand() *core.Command { core.RegionArgSpec(), }, Run: k8sKubeconfigGetRun, + Examples: []*core.Example{ + { + Short: "Get the kubeconfig for a given cluster", + ArgsJSON: `{"cluster_id": "11111111-1111-1111-1111-111111111111"}`, + }, + }, + SeeAlsos: []*core.SeeAlso{ + { + Command: "scw k8s kubeconfig install", + Short: "Install a kubeconfig", + }, + }, } }