Managing Kubernetes is not for the faint of heart. For all its popularity, Kubernetes, the container-orchestration program requires a great deal of skill and the right tools to manage software on its clusters properly. That's where Kubernetes Operators come in. And now Canonical's DevOps Juju-based Charm Open Operator Collection, the largest collection of application operators, supports Kubernetes, cloud-native, and traditional applications on Windows and Linux. The collection is hosted at Charmhub.io and follows the Open Operator Manifesto.
SEE: Managing the multicloud (ZDNet/TechRepublic special feature) | Download the free PDF version (TechRepublic)
So, what are Kubernetes Operators anyway? It's a method of packaging, deploying, and managing a Kubernetes application. A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes application programming interfaces (API) and kubectl tooling.
In short, an operator implements the lifecycle management of an application. The operator replaces custom hand-crafted institutional ops code with shared, standardized ops code packages. By so doing, an operator eliminates duplication of effort between organizations. This also helps companies by providing a shared operations codebase.
In addition, operators encapsulate application domain knowledge. This way you can set up and run applications and set up the relationships between them without learning the low-level details. Ideally, it provides the full application lifecycle, including configuration and integration, and day-2 actions.
Juju is a cloud DevOps tool. But it works at a higher level than such well known DevOps programs as Ansible, Puppet, Chef, or Salt. Those programs automate server configuration by setting up virtual machines (VM) in which each instance runs an identical software configuration. Juju works above them. It's meant to manage services, not machines. Juju does this with "charms." These are sharable, reusable, and repeatable expressions of DevOps best practices.
As such, Canonical CEO and founder Mark Shuttleworth said other DevOps "configuration management methods don't work with containers. You can't go to the container and configure it. With Juju Charms you a package of reusable operations code." Better yet, "even as the number of microservices explodes along with the number of lines needed for integration, Juju Charms still handles the integration between services and applications." The result is an easy setup and integration of multiple applications and services.
It's not just that Juju now works really well as a Kubernetes operator, explained Canonical Product Manager Sohini Roy. Just as "the operator pattern successfully replaced config management on Kubernetes for cloud-native workloads," explained Roy. "We are excited to generalize the operator pattern to include traditional applications on Linux and Windows, for a consistent model-driven operator framework for application management, across bare metal, virtual and Kubernetes estates."
So what does this mean in practice? Ian Tien, Mattermost co-founder and CEO, explained: "Data security and developer productivity are vital to our customers - across the full application lifecycle. With charmed open-source operators, Mattermost installs in minutes with the assurance the implementation utilizes best practices -- not just for deployment, but also for patching, upgrading, and even re-architecting."
You can give this a try for yourself via Charmhub.io. This is both a public repository of application operators and a forum for operator community collaboration. The Charmhub operators include declarative integration points for reusable automated integration between operators from diverse vendors. Integration code is embedded in each operator to handle dynamic integration during deployment, ensuring best practices for security, and availability throughout the process.
For example, it's trivial to set up a Kubernetes cluster running commonplace Linux, Apache, MySQL, and Perl/PHP/Python (LAMP) such as WordPress using MariaDB for the DBMS and Apache for the webserver.
While operators are language-neutral and can be developed in any language, Python is Juju's language of choice. Charmhub provides code sharing and collaboration facilities for Python operator developers to reuse libraries and interface definitions across operators. The Python Operator Framework handles low-level lifecycle management and integration details.
To reduce administrative overhead, operators are deployed in groups called models. You can then compose operators in an application graph with declarative integration. Since integration lines can cross cloud boundaries, charmed operators provide a reliable and consistent basis for multi- and hybrid-cloud operations.
This approach ensures a consistent operator experience regardless of vendor. Any changes you make in one operator automatically propagate to others in the same model.
This is done with the Juju Operator Lifecycle Manager (OLM). OLM provides services to operators. Beyond basic provisioning and lifecycle management capabilities the Juju OLM enables model-driven architecture with event delivery, event serialization, persistent state, leader election, application status monitoring, application messages, and integration data exchange capabilities.
I've long liked Juju. It makes setting up complex applications first across servers and then clouds much easier. Now, it's the same approach is making it easy to do the same over Kubernetes clusters and clouds. I highly recommend you give this new Charmed approach to Kubernetes Operators a try.