So I am trying to understand two parts:
What are the different types of values that can be put into "imagePullSecrets"? What does each one do?
What in particular does "regsecret" value for "imagePullSecrets" do?
Thank you!
imagePullSecrets
is the parameter which has to be used to invoke authorization token, also known as a secret, that stores Docker credentials that are used for accessing Docker registry inside Kubernetes Pod configuration.
kubectl create secret docker-registry <SECRET_NAME> --docker-server=<FQDN_DOCKER_SERVER> --docker-username=<USER_NAME> --docker-password=<USER_PASSWORD> --docker-email=<USER_EMAIL>
I assume that regsecret
equals SECRET_NAME
from above command line example, which defines Kubernetes secret:
NAME TYPE DATA AGE
<SECRET_NAME> kubernetes.io/dockercfg 1 5d
Finally to revoke data from secret just needs imagePullSecrets
to be included in the corresponded Pod configuration:
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-demo
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
hostNetwork: false
containers:
- name: nginx
image: <FQDN_DOCKER_SERVER>
imagePullSecrets:
- name: <SECRET_NAME>
Related documentation links from official Kubernetes resource: