Category: Tutorials

  • 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…

  • Ubuntu – Remove Snapd

    Ubuntu – Remove Snapd

    When I deploy a new Ubuntu Server, I automatically get this thing called “Snapd”. What is it, some package manager? Whatever it is, I don’t need it on my server. Here’s how to remove it: First, check if you have some Snap packages installed: Second, Remove (if any) installed Snap packages Third, Stop the Snap…

  • 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 🍔