quick notes
Using kubectl: First thing is getting bash completion
and make it permanent
Using kubectl effectively
kubectl is your Swiss Army knife. It can do pretty much anything around a cluster. Under the hood, kubectl connects to your cluster via the API. It reads your ~/.kube/config file (by default, this can be overridden with the KUBECONFIG environment variable or the --kubeconfig command-line argument), which contains the information necessary to connect to your cluster or clusters. The commands are divided into multiple categories:
Generic commands: Deal with resources in a generic way:
create, get, delete, run, apply, patch, replace
, and so onCluster management commands: Deal with nodes and the cluster at large:
cluster-info, certificate, drain
, and so onTroubleshooting commands:
describe, logs, attach, exec
, and so onDeployment commands: Deal with deployment and scaling:
rollout, scale, auto-scale
, and so onSettings commands: Deal with labels and annotations:
label, annotate
, and so onMisc commands:
help, config, version
Customization commands: Integrate the kustomize.io capabilities into kubectl
Configuration commands: Deal with contexts, switch between clusters and namespaces, set current context and namespace, and so on
Common commands
Last updated