Kubectl
Last updated
Was this helpful?
Last updated
Was this helpful?
uses curl under the hood
kubectl [command] --help
kubectl api-versions
kubectl get nodes
kubectl get all
@Deprecated
kubectl run
kubectl run ngnix-run --image=nginx
The context that kubectl uses is stored in ~/.kube/config
. (kubectl config view
shows parts of current configuration).
kubectl inspect -> etcs
kubectl logs -> pod
kubectl exec -it -> container
kubectl create -f podDefinitionFile.yaml
kubectl delete pods [name]
kubectl get pods [pod_name]
kubectl get pods -o wide
kubectl rollout status deployment nginx-deployment
k get rs -o wide
You need kubectl proxy to use curl commands.
kubectl proxy --port=8001 &
Proxy takes care of TLS connection => you can use http
.
kubectl config specifies to which cluster to authenticate
authorization is what this users can do
behind is a RBAC
kubectl auth can-i get prods
to find out what you can do
brew install kubectx
brew install kube-ps1