Skip to content

Commit ed0b1e3

Browse files
author
Kai Kummerer
committed
improve descriptions and examples
1 parent 19930af commit ed0b1e3

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

internal/cmd/ske/kubeconfig/create/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ func NewCmd(p *print.Printer) *cobra.Command {
5050
`Create a kubeconfig for the SKE cluster with name "my-cluster"`,
5151
"$ stackit ske kubeconfig create my-cluster"),
5252
examples.NewExample(
53-
`Create a login kubeconfig for the SKE cluster with name "my-cluster".`,
54-
"This kubeconfig does not contain any credentials and instead obtains valid credentials via the STACKIT CLI",
53+
`Get a login kubeconfig for the SKE cluster with name "my-cluster". `+
54+
"This kubeconfig does not contain any credentials and instead obtains valid credentials via the STACKIT CLI.",
5555
"$ stackit ske kubeconfig create my-cluster --login"),
5656
examples.NewExample(
5757
`Create a kubeconfig for the SKE cluster with name "my-cluster" and set the expiration time to 30 days`,

internal/cmd/ske/kubeconfig/login/login.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,21 @@ const (
3535
func NewCmd(p *print.Printer) *cobra.Command {
3636
cmd := &cobra.Command{
3737
Use: "login",
38-
Short: "login plugin for kubectl",
39-
Long: "login plugin for kubectl to create a short-lived kubeconfig to authenticate against a STACKIT Kubernetes Engine (SKE) cluster. To obtain a kubeconfig for use with the login command, use the 'kubeconfig create --login' command.",
40-
Args: args.NoArgs,
38+
Short: "Login plugin for kubernetes clients",
39+
Long: fmt.Sprintf("%s\n%s",
40+
"Login plugin for kubernetes clients, that creates short-lived credentials to authenticate against a STACKIT Kubernetes Engine (SKE) cluster.",
41+
"To obtain a kubeconfig for use with the login command, run 'kubeconfig create --login'.",
42+
),
43+
Args: args.NoArgs,
4144
Example: examples.Build(
4245
examples.NewExample(
43-
"login to a SKE cluster specified in the kubeconfig",
44-
"$ kubectl get pod"),
46+
`Get a login kubeconfig for the SKE cluster with name "my-cluster". `+
47+
"This kubeconfig does not contain any credentials and instead obtains valid credentials via the STACKIT CLI.",
48+
"$ stackit ske kubeconfig create my-cluster --login"),
49+
examples.NewExample(
50+
"Use the previously saved kubeconfig to authenticate to the SKE cluster, in this case with kubectl.",
51+
"$ kubectl cluster-info",
52+
"$ kubectl get pods"),
4553
),
4654
RunE: func(cmd *cobra.Command, args []string) error {
4755
ctx := context.Background()

0 commit comments

Comments
 (0)