Traefik

This section provides information about how to install and configure the ingress-based Traefik load balancer (version 2.2.8 or later for production deployments) to load balance Oracle WebCenter Content domain clusters.

Follow these steps to set up Traefik as a load balancer for an Oracle WebCenter Content domain in a Kubernetes cluster:

Contents

  1. Install the Traefik (ingress-based) load balancer
  2. Configure Traefik to manage ingresses
  3. Create an Ingress for the domain
  4. Verify domain application URL access
  5. Uninstall the Traefik ingress

Install the Traefik (ingress-based) load balancer

  1. Use Helm to install the Traefik (ingress-based) load balancer. For detailed information, see here. Use the values.yaml file in the sample but set kubernetes.namespaces specifically.

     $ cd ${WORKDIR}/weblogic-kubernetes-operator
     $ kubectl create namespace traefik
     $ helm repo add traefik https://containous.github.io/traefik-helm-chart
    

    Sample output:

     "traefik" has been added to your repositories
    
  2. Install Traefik:

     $ cd ${WORKDIR}/weblogic-kubernetes-operator
     $ helm install traefik  traefik/traefik \
          --namespace traefik \
          --values kubernetes/samples/scripts/charts/traefik/values.yaml \
          --set  "kubernetes.namespaces={traefik}" \
          --set "service.type=LoadBalancer" --wait
    
    Click here to see the sample output.

    A sample values.yaml for deployment of Traefik 2.2.x:

    Click here to see values.yaml

  3. Verify the Traefik (load balancer) services:

Please note the EXTERNAL-IP of the traefik-operator service. This is the public IP address of the load balancer that you will use to access the WebLogic Server Administration Console and WebCenter Content URLs.

$ kubectl get service -n traefik
NAME      TYPE           CLUSTER-IP   EXTERNAL-IP     PORT(S)                                          AGE
traefik   LoadBalancer   10.96.8.30   123.456.xx.xx   9000:30734/TCP,30305:30305/TCP,30443:30443/TCP   6d23h

To print only the Traefik EXTERNAL-IP, execute this command:

$ TRAEFIK_PUBLIC_IP=`kubectl describe svc traefik --namespace traefik | grep Ingress | awk '{print $3}'`
$ echo $TRAEFIK_PUBLIC_IP
123.456.xx.xx
  1. Verify the helm charts:

    $ helm list -n traefik
    NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
    traefik traefik         2               2021-10-11 12:22:41.122310912 +0000 UTC deployed        traefik-9.1.1   2.2.8
    
  2. Verify the Traefik status and find the port number

     $ kubectl get all -n traefik
    
    Click here to see the sample output.

Configure Traefik to manage ingresses

Configure Traefik to manage ingresses created in this namespace, where traefik is the Traefik namespace and wccns is the namespace of the domain:

    $ helm upgrade traefik traefik/traefik --namespace traefik --reuse-values \
    --set "kubernetes.namespaces={traefik,wccns}"
Click here to see the sample output.

Create an ingress for the domain

Create an ingress for the domain in the domain namespace by using the sample Helm chart. Here path-based routing is used for ingress. Sample values for default configuration are shown in the file ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/charts/ingress-per-domain/values.yaml. By default, type is TRAEFIK , tls is Non-SSL, and domainType is wccinfra. These values can be overridden by passing values through the command line or can be edited in the sample file values.yaml based on the type of configuration (non-SSL or SSL). If needed, you can update the ingress YAML file to define more path rules (in section spec.rules.host.http.paths) based on the domain application URLs that need to be accessed. The template YAML file for the Traefik (ingress-based) load balancer is located at ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/charts/ingress-per-domain/templates/traefik-ingress.yaml

  1. Install ingress-per-domain using Helm for non-SSL configuration:

     $ cd ${WORKDIR}/weblogic-kubernetes-operator
     $ helm install wcc-traefik-ingress  \
         kubernetes/samples/charts/ingress-per-domain \
         --set type=TRAEFIK \
         --namespace wccns \
         --values kubernetes/samples/charts/ingress-per-domain/values.yaml \        
         --set tls=NONSSL
    

    Sample output:

      NAME: wcc-traefik-ingress
      LAST DEPLOYED: Sun Jan 17 23:49:09 2021
      NAMESPACE: wccns
      STATUS: deployed
      REVISION: 1
      TEST SUITE: None
    

Verify domain application URL access

After setting up the Traefik (ingress-based) load balancer, verify that the domain application URLs are accessible through the load balancer port 30305 for HTTP access. The sample URLs for Oracle WebCenter Content domain of type wcc are:

http://${TRAEFIK_PUBLIC_IP}:30305/weblogic/ready
http://${TRAEFIK_PUBLIC_IP}:30305/console
http://${TRAEFIK_PUBLIC_IP}:30305/cs
http://${TRAEFIK_PUBLIC_IP}:30305/ibr	

Uninstall the Traefik ingress

Uninstall and delete the ingress deployment:

$ helm delete wcc-traefik-ingress  -n wccns