Cheat Sheet Kubectl
Cheat Sheet Kubectl
kubectl is a powerful command-line tool to maintain your Kubernetes cluster. Here are
commonly used commands to take you above and beyond average cluster administration.
Basic Commands
kubectl get kubectl create
kubectl get <resource> --output wide kubectl create --filename ./pod.yaml
List all information about the select resource type. Some resources require a name parameter. A small
Common resources include: list of resources you can create include:
Call resources using singular (pod), plural (pods), See required parameters:
or with shortcuts.
kubectl create cronjobs --help
Get pod by namespace:
-n, --namespace
Troubleshooting Commands
Advanced Commands
Apply configurations from files for resources within Copy files and directories to and from containers. The
your cluster. tar binary must be in the container. This can also be
used to pull or restore backups in an emergency. File
Use apply to add, update, or delete fields: location must be specified.