2 min read
If we need to write some script to retrieve a certain information that kubectl can provide, we can always add the option to remove headers and use something like awk to narrowit down. There's also a better way than doing this:
kubectl get ns --no-headers | awk '{ print $1 }'
31/08/2022
Read more...3 min read
Starting Kubernetes 1.23, ephemeral containers are enabled by default (in beta though). Using ephemeral containers we can now troubleshoot pods by deploying a temporary container into it with extra privileges or binaries to use
22/08/2022
Read more...2 min read
We can install the kubectl convert plugin to help us convert manifest between different API versions: For example, from an Ingress using the extensions/v1beta1 API version to networking.k8s.io/v1
16/06/2022
Read more...2 min read
Sometimes we all end up writing small one-liners to perform some daily tasks with kubectl, it can come handy to create kubectl plugin to be able to add a command that does precisely that for us. Let's see how to add a custom command to kubectl:
10/06/2022
Read more...3 min read
In the same way we can use git blame to identify who and when has modified a specific line, with kubectl blame we'll be able to do the same to Kubernetes objects
13/05/2022
Read more...