First, set up Helm:
$ helm repo add traefik https://helm.traefik.io/traefik --force-update
Create a namespace for the ingress controller.
$ kubectl create namespace traefik
Use the values.yaml file in the sample but set kubernetes.namespaces
specifically.
$ helm install traefik-operator traefik/traefik \
--namespace traefik \
--values kubernetes/samples/charts/traefik/values.yaml \
--set "kubernetes.namespaces={traefik}"
Create a namespace for the operator:
$ kubectl create namespace sample-weblogic-operator-ns
Create a service account for the operator in the operator’s namespace:
$ kubectl create serviceaccount -n sample-weblogic-operator-ns sample-weblogic-operator-sa
Use helm
to install and start the operator from the directory you just cloned:
$ helm install sample-weblogic-operator kubernetes/charts/weblogic-operator \
--namespace sample-weblogic-operator-ns \
--set image=ghcr.io/oracle/weblogic-kubernetes-operator:3.4.0 \
--set serviceAccount=sample-weblogic-operator-sa \
--set "enableClusterRoleBinding=true" \
--set "domainNamespaceSelectionStrategy=LabelSelector" \
--set "domainNamespaceLabelSelector=weblogic-operator\=enabled" \
--wait
This Helm release deploys the operator and configures it to manage Domains in any Kubernetes namespace with the label, weblogic-operator=enabled
. Because of the enableClusterRoleBinding
option, the operator will have privilege in all Kubernetes namespaces. This simplifies adding and removing managed namespaces as you will only have to adjust labels on those namespaces. If you want to limit the operator’s privilege to just the set of namespaces that it will manage, then remove this option, but this will mean that the operator has privilege only in the set of namespaces that match the selection strategy at the time the Helm release was installed or upgraded.
Verify that the operator’s pod is running, by listing the pods in the operator’s namespace. You should see one for the operator.
$ kubectl get pods -n sample-weblogic-operator-ns
Verify that the operator is up and running by viewing the operator pod’s log:
$ kubectl logs -n sample-weblogic-operator-ns -c weblogic-operator deployments/weblogic-operator