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.

  1. Navigate to the wdt-utils directory:
    cd $WORKDIR/kubernetes/create-access-domain/domain-home-on-pv/wdt-utils
  2. Run the following command to create the secret:
    ./create-secret.sh -l \
    "username=weblogic" \
    -l "password=<password>" \
    -n <domain_namespace> \
    -d <domain_uid> \
    -s <domain-uid>-weblogic-credentials
    Where:
    • <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.
    For example:
    ./create-secret.sh -l \
    "username=weblogic" \
    -l "password=<password>" \
    -n oamns \
    -d accessdomain \
    -s accessdomain-weblogic-credentials
    The output will look similar to the following:
    @@ Info: Setting up secret 'accessdomain-weblogic-credentials'.
    secret/accessdomain-weblogic-credentials created
    secret/accessdomain-weblogic-credentials labeled
  3. Verify the secret is created using the following command:
    kubectl get secret <kubernetes_domain_secret> -o yaml -n <domain_namespace>
    
    For example:
    kubectl get secret accessdomain-weblogic-credentials -o yaml -n oamns
    The output will look similar to the following:
    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