@@ -299,19 +299,19 @@ to the `docker` registry:
299
299
+
300
300
----
301
301
$ oc project <my_project>
302
- $ oc secrets new-dockercfg <my_registry> --docker-server=<my.registry.example.com> --docker-username=<username> --docker-password=<my_password> --docker-email=<[email protected] >
302
+ $ oc create secret docker-registry <my_registry> --docker-server=<my.registry.example.com> --docker-username=<username> --docker-password=<my_password> --docker-email=<[email protected] >
303
303
----
304
304
305
305
. If a `.dockercfg` file exists, create the secret using the `oc` command:
306
306
+
307
307
----
308
- $ oc secrets new <my_registry> .dockercfg=<.dockercfg>
308
+ $ oc create secret generic <my_registry> --from-file= .dockercfg=<path/to/ .dockercfg> --type=kubernetes.io/dockercfg
309
309
----
310
310
311
311
. Populate the `$HOME/.docker/config.json` file:
312
312
+
313
313
----
314
- $ oc secrets new <my_registry> .dockerconfigjson=<.docker/config.json>
314
+ $ oc create secret generic <my_registry> --from-file= .dockerconfigjson=<path/to/.dockercfg> --type=kubernetes.io/dockerconfigjson
315
315
----
316
316
317
317
. Use the `dockercfg` secret to pull images from the authenticated registry by
@@ -363,8 +363,8 @@ to the service accounts.
363
363
+
364
364
----
365
365
$ oc project <my_project>
366
- $ oc secrets new-dockercfg <my_registry> --docker-server=*<my_registry_example.com> --docker-username=<username> --docker-password=<my_password> --docker-email=<[email protected] >
367
- $ oc secrets new-dockercfg <my_docker_registry_ext_auth> --docker-server=<my.authsystem.example.com> --docker-username=<username> --docker-password=<my_password> --docker-email=<[email protected] >
366
+ $ oc create secret docker-registry <my_registry> --docker-server=*<my_registry_example.com> --docker-username=<username> --docker-password=<my_password> --docker-email=<[email protected] >
367
+ $ oc create secret docker-registry <my_docker_registry_ext_auth> --docker-server=<my.authsystem.example.com> --docker-username=<username> --docker-password=<my_password> --docker-email=<[email protected] >
368
368
$ oc secrets link default <my_registry> --for=pull
369
369
$ oc secrets link default <my_docker_registry_ext_auth> --for=pull
370
370
$ oc secrets link builder <my_registry>
@@ -438,7 +438,7 @@ openshift_master_admission_plugin_config={"openshift.io/ImagePolicy":{"configura
438
438
There is a current issue to be fixed in {product-title} 3.6.1 where
439
439
`ImagePolicy` pods can not be deployed using default templates, and give the
440
440
following error message `Failed create | Error creating: Pod "" is invalid:
441
- spec.containers[0].\image: Forbidden: this image is prohibited by policy`.
441
+ spec.containers[0].\image: Forbidden: this image is prohibited by policy`.
442
442
443
443
See the
444
444
https://access.redhat.com/solutions/3165041[Image Policy is not working as
@@ -629,7 +629,7 @@ $ TOKEN=$(oc sa get-token <my_serviceaccount> -n <registry_project>)
629
629
. Use the token as the password to create a `dockercfg` secret:
630
630
+
631
631
----
632
- $ oc secrets new-dockercfg <my_registry>
632
+ $ oc create secret docker-registry <my_registry> \
633
633
--docker-server=<myregistry.example.com> --docker-username=<notused> --docker-password=${TOKEN} --docker-email=<[email protected] >
634
634
----
635
635
0 commit comments