From zero to hero: Write your first Kubernetes charm

This tutorial will guide you through the steps of writing a Kubernetes charm for an application.

By the end of the tutorial, you’ll have equipped the application with operational logic and used Juju to deploy the application to a local Kubernetes cluster. You’ll also have learned how to implement typical functionality of a charm, including configuration, relations, and actions.

What you’ll need

  • A workstation. For example, a laptop with an amd64 architecture. You’ll need sufficient resources to launch a virtual machine with 4 CPUs, 8 GB RAM, and 50 GB disk space.

  • Familiarity with Linux.

  • Familiarity with the Python programming language, including Object-Oriented Programming and event handlers.

It will also help if you’re familiar with Juju and Kubernetes, but don’t worry if you’re new to these topics. This tutorial will guide you through each step.

What you’ll do

Next steps

By the end of this tutorial, you’ll have written and tested a Kubernetes charm that includes some typical functionality. Congratulations!

Did you know?

Writing a charm is also known as “charming”, and you are now a charmer!

There’s plenty more to explore:

If you’re wondering…

visit…

How do I…?

How-to guides

What is…?

Reference

Why…? So what?

Explanation