7.2.1 Creating a Kubernetes Secret for the WDT Domain
Create a Kubernetes secret for the Oracle Access Management (OAM) domain using the
create-secret.sh
script.
- Navigate to the
wdt-utils
directory:cd $WORKDIR/kubernetes/create-access-domain/domain-home-on-pv/wdt-utils
- Run the following command to create the
secret:
Where:./create-secret.sh -l \ "username=weblogic" \ -l "password=<password>" \ -n <domain_namespace> \ -d <domain_uid> \ -s <domain-uid>-weblogic-credentials
-
<password>
is the password for the WebLogic user. -
<domain_namespace>
is the domain namespace for OAM. -
<domain_uid>
is the domain UID to be created. -
<domain-uid>-weblogic-credentials
is the name you want to create for the secret for this namespace.Note:
The secret name must follow the format<domain-uid>-weblogic-credentials
or domain creation will fail.
The output will look similar to the following:./create-secret.sh -l \ "username=weblogic" \ -l "password=<password>" \ -n oamns \ -d accessdomain \ -s accessdomain-weblogic-credentials
@@ Info: Setting up secret 'accessdomain-weblogic-credentials'. secret/accessdomain-weblogic-credentials created secret/accessdomain-weblogic-credentials labeled
-
- 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-weblogic-credentials -o yaml -n oamns
apiVersion: v1 data: password: <password> username: d2VibG9naWM= kind: Secret metadata: creationTimestamp: "<DATE>" labels: weblogic.domainUID: accessdomain name: accessdomain-weblogic-credentials namespace: oamns resourceVersion: "44175245" uid: a135780e-6f3b-4be1-8643-f81bfb9ba399 type: Opaque