Install the operator and ingress controller

Use Helm to install the operator and Traefik ingress controller.

First, set up Helm:

$ helm repo add traefik --force-update

Create a Traefik ingress controller.

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}"

Install the operator.

  1. Create a namespace for the operator:

    $ kubectl create namespace sample-weblogic-operator-ns
  2. Create a service account for the operator in the operator’s namespace:

    $ kubectl create serviceaccount -n sample-weblogic-operator-ns sample-weblogic-operator-sa
  3. 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 --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.3 \
      --namespace sample-weblogic-operator-ns \
      --set "enableClusterRoleBinding=true" \
      --set "domainNamespaceSelectionStrategy=LabelSelector" \
      --set "domainNamespaceLabelSelector=weblogic-operator\=enabled" \

    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.

  4. 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
  5. 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