Task configure sa: 'Add image pull secrets to a service account' minor fix
This commit is contained in:
@@ -263,14 +263,14 @@ kubectl replace serviceaccount default -f ./sa.yaml
|
|||||||
|
|
||||||
Now, when a new Pod is created in the current namespace and using the default ServiceAccount, the new Pod has its `spec.imagePullSecrets` field set automatically:
|
Now, when a new Pod is created in the current namespace and using the default ServiceAccount, the new Pod has its `spec.imagePullSecrets` field set automatically:
|
||||||
|
|
||||||
````shell
|
```shell
|
||||||
kubectl run nginx --image=nginx --restart=Never
|
kubectl run nginx --image=nginx --restart=Never
|
||||||
kubectl get pod nginx -o=jsonpath='{.spec.imagePullSecrets[0].name}'
|
kubectl get pod nginx -o=jsonpath='{.spec.imagePullSecrets[0].name}{"\n"}'
|
||||||
````
|
```
|
||||||
|
|
||||||
The output is:
|
The output is:
|
||||||
|
|
||||||
```shell
|
```
|
||||||
myregistrykey
|
myregistrykey
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user