kubectl

kubectl

TLDR

List all information about a resource with more details

>_ kubectl get [pod|service|deployment|ingress|...] -o wide
copy

Update specified pod with the label 'unhealthy' and the value 'true'

>_ kubectl label pods [name] unhealthy=true
copy

List all resources with different types

>_ kubectl get all
copy

Display resource (CPU/Memory/Storage) usage of nodes or pods

>_ kubectl top [pod|node]
copy

Print the address of the master and cluster services

>_ kubectl cluster-info
copy

Display an explanation of a specific field

>_ kubectl explain [pods.spec.containers]
copy

Print the logs for a container in a pod or specified resource

>_ kubectl logs [pod_name]
copy

Run command in an existing pod

>_ kubectl exec [pod_name] -- [ls /]
copy

Copied to clipboard
free 100$ digital ocean credit