Answers for "kubectl logs"

0

kubectl list context

# list kubernets contexts
kubectl config get-contexts
Posted by: Guest on January-14-2021
3

kubectl delete all pods

kubectl delete --all pods
Posted by: Guest on May-10-2020
2

kubectl restart deployment

kubectl rollout restart deployment yourDeploymentName
Posted by: Guest on May-11-2020
0

kubectl get pods

# Get pods in default namespace
kubectl get pods

#Get Pods in my-namespace
kubectl get pods -n my-namespace

#Get Pods in all namespaces
kubectl get pods --all-namespaces
Posted by: Guest on October-20-2020
2

kubectl get pod by node

kubectl get pods --all-namespaces -o wide --field-selector spec.nodeName=<node>
Posted by: Guest on September-04-2020
1

kubectl get logs of deployment

kubectl logs -f deployment/<name-of-deployment>
or
kubectl logs deployment/<name-of-deployment>
Posted by: Guest on November-03-2020

Browse Popular Code Answers by Language