From zero to hero: Write your first Kubernetes charm
This tutorial will introduce you to the official way to write a Kubernetes charm — that is, how to equip an application with all the operational logic that it needs so that you can manage it on any Kubernetes cloud with just a few commands, using the Juju OLM.
Did you know? Writing a charm is also known as ‘charming’!
What you’ll need:
- A working station, e.g., a laptop.
- Good knowledge of the Juju OLM
- Familiarity with the Python programming language, Object-Oriented Programming, Event Handlers
- Understanding of Kubernetes fundamentals
What you’ll do:
- Understand your application
- Set up your development environment
- Develop your charm:
- Create a minimal Kubernetes charm
- Make your charm configurable
- Expose the version of the application behind your charm
- Integrate your charm with PostgreSQL
- Preserve your charm’s data
- Expose your charm’s operational tasks via actions
- Observe your charm with COS Lite and set up cross-model integrations
Next steps:
By the end of this tutorial you will have built a Kubernetes charm and evolved it in a number of typical ways. But there is a lot more to explore:
If you are wondering… | visit… |
---|---|
“How do I…?” | Juju SDK How-to docs |
“What is…?” | Juju SDK Reference docs |
“Why…?”, “So what?” | Juju SDK Explanation docs |
Finally, if your question is “How can I learn more about managing charms operations with Juju?”, consider also the Juju OLM docs!
Last updated a month ago.