Skip to content

ezgh kubernetes update-kubeconfig

Set up kubectl for a cluster.

Updated View as Markdown
ezgh kubernetes update-kubeconfig <cluster> [--private] [--alias name] [--kubeconfig path] [flags]

Add a cluster to your kubeconfig and make it the current context. kubectl then signs in as this profile’s identity, running ezgh kubernetes token for a short-lived token whenever it needs one: nothing is stored. Your identity needs kubernetes.clusters.accessKubernetesApi on the cluster and an access entry in it. --private uses the endpoint inside the VPC. Other clusters, users and contexts in the file are kept; running it again changes nothing. The file is the first in KUBECONFIG, else ~/.kube/config.

Part of ezgh kubernetes.

Examples

ezgh kubernetes update-kubeconfig prod
kubectl get nodes

Flags

Flag Type Default Description
--alias string the name of the cluster, user and context (default ezgh-<cluster ID>)
--kubeconfig string the kubeconfig to write (default the first in KUBECONFIG, else ~/.kube/config)
--private boolean use the endpoint inside the VPC

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close