Examples

Useful kubectl commands translated into “command” and “arguments” parts:
Table 1.
Description Command Arguments
Get Nodes kubectl
[
  “get”,
  “nodes"
]
Get Nodes (wide) kubectl
[
  “get”,
  “nodes”,
  "-o”,
  “wide"
]
Top Node {node-name} kubectl
[
  “top”,
  “node”,
  "{node-name}“
]
Get Services kubectl
[
  “get”,
  “services"
]
Get Config Maps kubectl
[
  “get”,
  “configmaps"
]
Get Deployments kubectl
[
  “get”,
  “deployments"
]
Restart Deployment {{deployment-name}} kubectl
[
  “rollout”,
  “restart”,
  “deployment”,
  "{deployment-name}“
]
Get Pods kubectl
[
  “get”,
  “pods"
]
Top Pod {pod-name} kubectl
[
  “top”,
  “pod”,
  "{pod-name}“
]
Describe Pod {pod-name} kubectl
[
  “describe”,
  “pod”,
  "{pod-name}“
]
Apply YAML {configuration.yaml} kubectl
[
  “apply”,
  "-f”,
  "{configuration.yaml}“
]
Apply Multiple YAMLs kubectl
[
  “apply”,
  "-f”,
  "{configuration1.yaml}",
  "-f”,
  "{configuration2.yaml}“
]