Skip to main content

astroctl_infra_kubernetes_generate-kubeconfig

astroctl infra kubernetes generate-kubeconfig

Generate kubeconfig for Kubernetes clusters

Synopsis

Generate kubeconfig for Kubernetes clusters managed by Astro Platform. For cloud-managed clusters (EKS, GKE, AKS), the kubeconfig is generated immediately. For self-managed clusters, generation is async.

astroctl infra kubernetes generate-kubeconfig [flags]

Examples


# Generate kubeconfig with custom duration
astroctl infra k8s generate-kubeconfig --cluster-name my-cluster --duration 8h

# Then set the context to use it
astroctl infra k8s set-context --cluster-name my-cluster

Options

-c, --cluster-name string cluster name
--duration string duration for the kubeconfig. The default is 1h and the format is 1h, 1m, 1s (default "1h")
-h, --help help for generate-kubeconfig

Options inherited from parent commands

-o, --output string Output format (json|yaml) (default "yaml")

SEE ALSO