3 min read
While forking on Kubernetes manifest it's easy to forget the available fields for each Kubernetes object. Using kubectl explain we can get all the fields available with a short description of them. Pretty much a man inside kubectl
13/08/2021
Read more...2 min read
While draining a node it might fail with the message cannot delete Pods with local storage as follows:
$ kubectl drain tycho.pet2cattle.com --ignore-daemonsets
node/tycho.pet2cattle.com already cordoned
error: unable to drain node "tycho.pet2cattle.com", aborting command...
There are pending nodes to be drained:
tycho.pet2cattle.com
error: cannot delete Pods with local storage (use --delete-emptydir-data to override): spinnaker-ampa/spin-rosco-658fdb4694-v99jt
02/08/2021
Read more...2 min read
Some kubernetes objects creates and manages other kubernetes objects in order to provide it's functionality. For example, the Deployment object creates a ReplicaSet that in turn creates the desired Pod objects. We can always track down this relationship using kubectl describe but using the tree krew plugin we can see the relationship in a visual way. We can install it like so:
$ kubectl krew install tree
14/06/2021
Read more...2 min read
When performing rolling updates we can see it's history using kubectl rollout history:
$ kubectl rollout history deploy pet2cattle
deployment.apps/pet2cattle
REVISION CHANGE-CAUSE
100 <none>
101 <none>
102 <none>
103 <none>
104 <none>
105 <none>
106 <none>
107 <none>
109 kubectl scale deployment/pet2cattle --replicas=2 --record=true
110 kubectl scale deployment/pet2cattle --replicas=5 --record=true
111 kubectl scale deployment/pet2cattle --replicas=1 --record=true
If have any problem with the update we can undo and update using kubectl rollout undo
25/05/2021
Read more...2 min read
To change a container's image we can:
Let's check how to use kubectl set image
14/05/2021
Read more...