Pulling private images in Kubernetes requires a Secret with registry credentials. Here's the minimal setup that works.
Tip: use imagePullSecretsCreate a Kubernetes secret from your registry credentials:
kubectl create secret docker-registry fastpanel-registry --docker-server=registry.fastpanel.app --docker-username=YOUR_USER --docker-password=YOUR_TOKEN then reference it in your Deployment spec.Create an image pull secret
kubectl create secret docker-registry fastpanel-registry --docker-server=registry.fastpanel.app --docker-username=your-team --docker-password=fp_token_xxx --namespace=production
Reference in your Deployment
spec:
imagePullSecrets:
- name: fastpanel-registry
containers:
- name: app
image: registry.fastpanel.app/your-team/myapp:v1.2.3
Service account-level pull secrets
Instead of adding imagePullSecrets to every deployment, patch the default
service account:
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "fastpanel-registry"}]}' -n production
Now all pods in the production namespace will automatically use the registry credentials.