Kubernetes
Manage your Kubernetes clusters directly from the terminal.
List clusters
Section titled “List clusters”enumctl kubernetes listShows all clusters available in your enum account.
┌──────────────────────────────────┬──────────────┬──────────────┐│ ID │ Name │ Project │├──────────────────────────────────┼──────────────┼──────────────┤│ eke-01h85x0aa0b2cm8k4fqe6jnwd1 │ production │ my-project ││ eke-01kp2qy8nyfqb42vmyr6h8y717 │ staging │ my-project │└──────────────────────────────────┴──────────────┴──────────────┘Describe a cluster
Section titled “Describe a cluster”enumctl kubernetes describe <cluster-name>Returns details about a specific cluster.
ID eke-01kp2qy8nyfqb42vmyr6h8y717Name productionProject my-projectConfigure kubectl
Section titled “Configure kubectl”enumctl kubernetes kubeconfig <cluster-name>Fetches the cluster credentials and merges them into a local file. By default that is the first path in $KUBECONFIG, or ~/.kube/config. You are prompted before any changes are written unless you pass --force.
Write to a different path (creates the file if missing):
enumctl kubernetes kubeconfig <cluster-name> -f ~/.kube/config.d/enum.yaml --forcePrint to stdout instead of writing a file:
enumctl kubernetes kubeconfig <cluster-name> -f -| Flag | Short | Description |
|---|---|---|
--file | -f | Merge into this file instead of the default (- prints to stdout) |
--force | Write without confirmation |
After this, you can use kubectl as normal:
kubectl get nodeskubectl get pods -AGet token
Section titled “Get token”enumctl kubernetes get-tokenOutputs the current access token in Kubernetes ExecCredential format. This is called automatically by kubectl after you’ve configured access with kubeconfig. You typically don’t need to run this directly.