7.1.2 Creating a Kubernetes Secret for the WLST Domain
Create a Kubernetes secret for the domain using the
create-weblogic-credentials script.
- Navigate to the
$WORKDIR/kubernetes/create-weblogic-domain-credentialsdirectory:cd $WORKDIR/kubernetes/create-weblogic-domain-credentials - Run the following command to create the
secret:
Where:./create-weblogic-credentials.sh -u weblogic -p <pwd> -n <domain_namespace> -d <domain_uid> -s <kubernetes_domain_secret>-u weblogicis the WebLogic username.-p <pwd>is the password for the WebLogic user.-n <domain_namespace>is the domain namespace.-d <domain_uid>is the domain UID to be created.-s <kubernetes_domain_secret>is the name you want to create for the secret for this namespace.
The output will look similar to the following:./create-weblogic-credentials.sh -u weblogic -p <password> -n oamns -d accessdomain -s accessdomain-credentialssecret/accessdomain-credentials created secret/accessdomain-credentials labeled The secret accessdomain-credentials has been successfully created in the oamns namespace. - Verify the secret is created using the following
command:
For example:kubectl get secret <kubernetes_domain_secret> -o yaml -n <domain_namespace>
The output will look similar to the following:kubectl get secret accessdomain-credentials -o yaml -n oamnsapiVersion: v1 data: password: V2VsY29tZTE= username: d2VibG9naWM= kind: Secret metadata: creationTimestamp: "<DATE>" labels: weblogic.domainName: accessdomain weblogic.domainUID: accessdomain name: accessdomain-credentials namespace: oamns resourceVersion: "29428101" uid: 6dac0561-d157-4144-9ed7-c475a080eb3a type: Opaque