kubectl-config
manages kubeconfig files
TLDR
View config
SYNOPSIS
kubectl config subcommand [options]
DESCRIPTION
kubectl config manages kubeconfig files, which store the connection details, credentials, and preferences needed to interact with Kubernetes clusters. The kubeconfig file (located at ~/.kube/config by default, or specified via the KUBECONFIG environment variable) defines clusters, users, and contexts, where each context is a named combination of a cluster, a user, and an optional default namespace.
The command provides subcommands for viewing the merged configuration, switching between contexts to target different clusters, setting default namespaces, and adding or modifying cluster and user entries. This is essential for developers and operators who work with multiple Kubernetes environments such as development, staging, and production clusters.
PARAMETERS
view
Display kubeconfig.current-context
Show current context.use-context NAME
Switch context.get-contexts
List contexts.set-context NAME
Modify context.set-cluster NAME
Add/modify cluster.--help
Display help information.
CAVEATS
Subcommand of kubectl. Modifies kubeconfig file. Consider kubectx for easier switching.
HISTORY
kubectl config provides kubeconfig management for Kubernetes multi-cluster access.
