Kubernetes Tipps, Tricks and Reads

Kubernetes Tidbits

Let’s face it. Most of us are not using the Kubernetes CLI every day. Some might even argue that factual knowledge is overrated. This posting is more a reminder for myself; I’d like to list some little helpers that help to improve your Kubernetes command-line skills:

Kubernetes Contexts

Show all available contexts (e.g. Minikube, GKE, Oracle Wercker):

$ kubectl config view --minify

YAML Output

Get the output of a deployment as more readable as YAML.

$ kubectl get deployment my-nginx -o yaml

Set custom namespace as default

Set default namespace, e.g. when working in a shared cluster.

$ kubectl config set-context $(kubectl config current-context) --namespace=XYZ
# Validate it
$ kubectl config view | grep namespace:

Other resources

I will add more here for sure. These days I am using K8s a lot 🙂 Also check out the following resources:

To be continued

Speak Your Mind

*