Andrew

This past November, Docker Hub started enforcing rate limits for image pulls for anonymous and free account users.

To ensure that your docker pulls on Kubernetes are authenticated, first create a docker-registry secret to hold your Docker Hub credentials:

kubectl create secret docker-registry <secret_name> \
--docker-server=docker.io \
--docker-username=<username> \
--docker-password=<password> \
--docker-email=<email>

Then you’ll need to patch your default service account to include the secret:

imagePullSecrets:
- name: <secret_name>

If you’re on OpenShift, you can use the following handy command to link the secret to the service account instead:

oc secrets link default <secret_name> --for=pull

--

--

Photo by Amanda Mocci on Unsplash

Just a quick post on stale branches on this Black Friday. Like old docker images, Git branches that are no longer needed inevitably starts to accumulate as a by-product of everyday development.

To remove these local branches, I use the following commands:

> git remote prune origin
> git branch -vv | grep "origin/.*: gone]" | awk '{print $1}' | xargs git branch -D

And if you need to remove old docker images, check out my post on that here.

--

--