4.7 Creating a Kubernetes Secret for the Container Registry
Create a Kubernetes secret that stores the credentials for the container registry where the Oracle HTTP Server (OHS) image is stored.
Note:
If you are not using a container registry and have loaded the images on each of the worker nodes, then there is no need to create the registry secret.Run the following command to create the
secret:
kubectl create secret docker-registry "regcred" --docker-server=<CONTAINER_REGISTRY> \
--docker-username="<USER_NAME>" \
--docker-password=<PASSWORD> --docker-email=<EMAIL_ID> \
--namespace=<domain_namespace>
For example, if using Oracle Container
Registry:kubectl create secret docker-registry "regcred" --docker-server=container-registry.oracle.com \
--docker-username="user@example.com" \
--docker-password=password --docker-email=user@example.com \
--namespace=ohsns
Replace
<USER_NAME>
and <PASSWORD>
with the
credentials for the registry with the following caveats:
- If using Oracle Container Registry to pull the OHS container image, this is the username and password used to login to Oracle Container Registry. Before using this image you must login to Oracle Container Registry, navigate to Middleware > ohs and accept the license agreement. For future releases (post January 25) that contain the latest Patch Set Update (PSU) and other fixes released with the Critical Patch Update (CPU) program, you should navigate to Middleware >ohs_cpu.
- If using your own container registry to store the OHS container image, this is the username and password (or token) for your container registry.
The output will look similar to the
following:
secret/regcred created