Skip navigation

In my series of blogs around WebLogic, containers and Kubernetes I'd like to tell you about "old meets new". Well "Old" is maybe an inappropriate term in this case, but what I actually mean is how WebLogic's relation to traditional infrastructure like servers and VMs and from a container based perspective with a container orchestrator platform such as Kubernetes, and Oracle's cloud implementation of it, Oracle Container Clusters(OKE) holds.

 

Operators

 

Kubernetes as a platform knows all about it's pods, services, policies, persitent volumes and so on, but as demands of what to containerize became more demanding, it was not sufficient anymore. If you have a stateless web app to control, in a lightweight container, kubernetes can handle it well. But an entire database or application server platform in a container is something different. Specific tasks and details regarding all kinds of configurations and operations can never be handled by kubernetes, similar to a VM or server; they can't do that either.

Here Operators will be implemented.

Operators :

  • They extend  the K8S api
  • Configure & manage  more complex instances
  • They leverage more experience based knowledge to Kubernetes

 

 

This schema represents the basic components of an operator work and an operator uses components such as:

  • The Operator Framework SDK
  • Custom Resource Definitions (CRD) - For adding own custom objects as they were Kubernetes objects
  • ConfigMaps - configuration properties injected to pods
  • Additional built in tools to manage, build, package and deploy an environment in Kubernetes

 

 

Operators are written for many OpenSource and commercial products, and Oracle has one written for Oracle WebLogic which can do simpler WebLogic management in Kubernetes by managing overall WebLogic environment through Kubernetes APIs such as:

    • Load Balancer, Network,
    • Ingress Controllers,
    • Security,
    • HA restart, upgrade, scaling
    • Persistent storage

And it ensures WebLogic best practices regarding configuation and administration are followed.

 

 

This schema represents some of the WebLogic Kubernetes operators tasks for management.

 

Upgrading the WebLogic Operator

The WebLogic Operator source code is available on GitHub: https://github.com/oracle/weblogic-kubernetes-operator, and the operator images are pushed to the docker hub and Oracle's own container registry:

Docker Hub: https://hub.docker.com/r/oracle/weblogic-kubernetes-operator/

OCR: https://container-registry.oracle.com/middleware/weblogic-kubernetes-operator:latest

 

The version I was running on my cluster was 2.5.0 which I installed with Helm. As you might know, Helm is a package and release management tool for Kubernetes.

 

First of all check the status of the current deployed operator:

helm status weblogic-operator --namespace weblogic-operator-namespace
·

Checkthe deployed version in the namespace

helm list --namespace weblogic-operator-namespace

 

The newest version released in May 2020 is 3.0.0-rc1, so lets upgrade, so in my custom-values.yaml I map to the newest version from the container registry:

 

Note: this could also be from the docker hub.

 

And do the upgrade:

helm upgrade   --reuse-values   --set "domainNamespaces={sample-domains-ns1}"   --set "javaLoggingLevel=FINE"   --wait   weblogic-operator kubernetes/charts/weblogic-operator

 

Where kubernetes/charts/weblogic-operator is the location of my custom values

After pulling the image the bew version was installed:

 

 

And to complete, I tested using some lifecycle functions such as restarting the domain:

 

kubectl patch domain soaosbdomain -n soa-ns --type='json' -p='[{"op": "replace", "path": "/spec/serverStartPolicy", "value": "NEVER" }]'
kubectl patch domain soaosbdomain -n soa-ns --type='json' -p='[{"op": "replace", "path": "/spec/serverStartPolicy", "value": "IF_NEEDED" }]'

Which triggers the domain to stop and start. I admit it's not a great test in a production live situation but for me it was just a test.

 

I haven't tested any new features yet, that might come in some later stage.

 

Conclusion

 

Operators are evident in container landscapes these days, but they doesn't make life less complex. Howver they are necessary in a complex environment as a WebLogic platform can be. Hope this helps you a bit further in your journey.