Skip to content

feat(k8s): add example for kubeconfig get #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Retrieve the kubeconfig for a specified cluster.
USAGE:
scw k8s kubeconfig get <cluster-id ...> [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
Expand All @@ -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
12 changes: 12 additions & 0 deletions internal/namespaces/k8s/v1/custom_kubeconfig_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
}
}

Expand Down