This sample demonstrates how to create a Kubernetes Secret containing the
credentials for a WebLogic domain. The operator expects this secret to be
named following the pattern domainUID-weblogic-credentials, where domainUID
is the unique identifier of the domain. It must be in the same namespace
that the domain will run in.
-u user name, must be specified.
-p password, must be provided using the -p argument or user will be prompted to enter a value.
-d domainUID, optional. The default value is domain1. If specified, the secret will be labeled with the domainUID unless the given value is an empty string.
-n namespace, optional. Use the default namespace if not specified.
-s secretName, optional. If not specified, the secret name will be determined based on the domainUID value.
This creates a generic secret containing the user name and password as literal values.
You can check the secret with the kubectl get secret command. The following example is shown,
including the output:
$ kubectl -n domain-namespace-1 get secret domain1-weblogic-credentials -o yaml