Tag: kubectl

  • Kubernetes – Pretty Kubectl Output With Kubecolor

    Kubernetes – Pretty Kubectl Output With Kubecolor

    Not everything in this world has to be black and white. It can be yellow, red or green… Such as with Kubecolor! Kubecolor (https://github.com/hidetatz/kubecolor) is a wonderful little utility that turns the black, grey and white output from kubectl. And makes it pretty with color! Install it on Mac with: And turn this: Into this!:…

  • Kubernetes – Prevent Empty Replicasets From Deployments

    Kubernetes – Prevent Empty Replicasets From Deployments

    Kubernetes deployments are funny. For every kubectl rollout restart deployment (or it’s API equivalent), there is a new -empty- statefulset… If you want to take a look, run the following: Quite allot huh? Clean them up with: To prevent a new empty replicaset for every new deployment, add: To your deployment, this will prevent each…

  • Kubernetes – Delete All Completed Jobs One-Liner

    Kubernetes – Delete All Completed Jobs One-Liner

    Sometimes you forget, or don’t want to add, successfulJobsHistoryLimit or event perhaps failedJobsHistoryLimit. Whatever the case, the end result looks something like this: You can of course go and kubectl delete all of them, but a much quicker solution is using this one-liner: Running the above one-line will list all the jobs in the default…

  • Kubernetes – Connect To Private Container Registry

    Kubernetes – Connect To Private Container Registry

    Now that you are hosting your own registry (… are you?). You probably want to deploy Kubernetes pods from that registry. For this you need two things: Docker registry credentials saved in a Secret imagePullSecrets in deployment pointing to said Secret First, Create secret: Second, Use secret in in deployment. Example: And you’re done 🍔

  • Kubernetes – Quick Pod Shell Access With Kubeshell

    Kubernetes – Quick Pod Shell Access With Kubeshell

    Entering the bash/sh shell in an Kubernetes container can look like this: Or.. You can keep it simple with Kubeshell Press enter and you’re [hacker voice] in. GITHub.com/roubles is the author of kubeshell Easily install with pip: Hack away! 👾