6.5 Installing the WebLogic Kubernetes Operator
Oracle Access Management (OAM) on Kubernetes leverages the WebLogic Kubernetes Operator.
- Create a Kubernetes namespace for the WebLogic Kubernetes Operator by running the
following
command:
For example:kubectl create namespace <sample-kubernetes-operator-ns>
The output will look similar to the following:kubectl create namespace opns
namespace/opns created
- Create a service account for the operator in the operator’s namespace by running the
following
command:
For example:kubectl create serviceaccount -n <sample-kubernetes-operator-ns> <sample-kubernetes-operator-sa>
The output will look similar to the following:kubectl create serviceaccount -n opns op-sa
serviceaccount/op-sa created
- Navigate to the
$WORKDIR
:cd $WORKDIR
- Run the following helm command to install and start the
operator:
For example:helm install weblogic-kubernetes-operator kubernetes/charts/weblogic-operator \ --namespace <sample-kubernetes-operator-ns> \ --set image=ghcr.io/oracle/weblogic-kubernetes-operator:4.2.10 \ --set serviceAccount=<sample-kubernetes-operator-sa> \ --set "enableClusterRoleBinding=true" \ --set "domainNamespaceSelectionStrategy=LabelSelector" \ --set "domainNamespaceLabelSelector=weblogic-operator\=enabled" \ --set "javaLoggingLevel=FINE" --wait
The output will look similar to the following:helm install weblogic-kubernetes-operator kubernetes/charts/weblogic-operator \ --namespace opns \ --set image=ghcr.io/oracle/weblogic-kubernetes-operator:4.2.10 \ --set serviceAccount=op-sa \ --set "enableClusterRoleBinding=true" \ --set "domainNamespaceSelectionStrategy=LabelSelector" \ --set "domainNamespaceLabelSelector=weblogic-operator\=enabled" \ --set "javaLoggingLevel=FINE" --wait
NAME: weblogic-kubernetes-operator LAST DEPLOYED: <DATE> NAMESPACE: opns STATUS: deployed REVISION: 1 TEST SUITE: None
- Verify that the operator’s pod and services are running by executing the following
command:
For example:kubectl get all -n <sample-kubernetes-operator-ns>
The output will look similar to the following:kubectl get all -n opns
NAME READY STATUS RESTARTS AGE pod/weblogic-operator-676d5cc6f4-wct7b 1/1 Running 0 40s pod/weblogic-operator-webhook-7996b8b58b-9sfhd 1/1 Running 0 40s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/weblogic-operator-webhook-svc ClusterIP 10.100.91.237 <none> 8083/TCP,8084/TCP 47s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/weblogic-operator 1/1 1 1 40s deployment.apps/weblogic-operator-webhook 1/1 1 1 40s NAME DESIRED CURRENT READY AGE replicaset.apps/weblogic-operator-676d5cc6f4 1 1 1 40s replicaset.apps/weblogic-operator-webhook-7996b8b58b 1 1 1 46s
- Verify the operator pod’s
log:
For example:kubectl logs -n <sample-kubernetes-operator-ns> -c weblogic-operator deployments/weblogic-operator
The output will look similar to the following:kubectl logs -n opns -c weblogic-operator deployments/weblogic-operator
... {"timestamp":"<DATE>","thread":21,"fiber":"","namespace":"","domainUID":"","level":"FINE","class":"oracle.kubernetes.operator.DeploymentLiveness","method":"run","timeInMillis":1678183291191,"message":"Liveness file last modified time set","exception":"","code":"","headers":{},"body":""} {"timestamp":"<DATE>","thread":37,"fiber":"","namespace":"","domainUID":"","level":"FINE","class":"oracle.kubernetes.operator.DeploymentLiveness","method":"run","timeInMillis":1678183296193,"message":"Liveness file last modified time set","exception":"","code":"","headers":{},"body":""} {"timestamp":"<DATE>","thread":31,"fiber":"","namespace":"","domainUID":"","level":"FINE","class":"oracle.kubernetes.operator.DeploymentLiveness","method":"run","timeInMillis":1678183301194,"message":"Liveness file last modified time set","exception":"","code":"","headers":{},"body":""} {"timestamp":"<DATE>","thread":31,"fiber":"","namespace":"","domainUID":"","level":"FINE","class":"oracle.kubernetes.operator.DeploymentLiveness","method":"run","timeInMillis":1678183306195,"message":"Liveness file last modified time set","exception":"","code":"","headers":{},"body":""}