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
Access the operator Helm chart using this format: helm repo add <helm-chart-repo-name> <helm-chart-repo-url>
.
Each version of the Helm chart defaults to using an operator image from the matching version.
$ helm repo add weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/charts --force-update
Install the operator using this format: helm install <helm-release-name> <helm-chart-repo-name>/weblogic-operator ...
$ helm install sample-weblogic-operator weblogic-operator/weblogic-operator \
--version 3.4.13
\
--namespace sample-weblogic-operator-ns \
--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