• Logo
    The ops library
  • juju.is
  • More resources
    • Forum
    • GitHub
Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
The ops library documentation
The ops library documentation
  • Tutorials
    • Write your first machine charm
    • From zero to hero: Write your first Kubernetes charm
      • Study your application
      • Set up your development environment
      • Create a minimal Kubernetes charm
      • Make your charm configurable
      • Integrate your charm with PostgreSQL
      • Expose operational tasks via actions
      • Observe your charm with COS Lite
  • How-to guides
    • Manage charms
    • Write and structure charm code
    • Write unit tests for a charm
    • Write integration tests for a charm
    • Log from your charm
    • Run workloads with a machine charm
    • Run workloads with a Kubernetes charm
    • Manage storage
    • Manage resources
    • Manage actions
    • Manage configuration
    • Manage relations
    • Manage leadership changes
    • Manage libraries
    • Manage interfaces
    • Manage secrets
    • Manage stored state
    • Manage opened ports
    • Manage the charm version
    • Manage the workload version
    • Manage metrics
    • Trace the charm code
    • Legacy how-to guides
      • Write legacy unit tests for a charm
      • Turn a hooks-based charm into an ops charm
  • Reference
    • ops.main entry point
    • ops
    • ops.pebble
    • ops.testing (was: Scenario)
    • ops.testing.Harness (legacy unit testing)
    • ops.tracing
  • Explanation
    • Charm-relation-interfaces
    • Testing
    • Tracing
    • Holistic vs delta charms
    • How, and when, to defer events
    • StoredState: Uses, Limitations
    • State-transition testing
Back to top
View this page

TutorialsΒΆ

Writing a machine charm is not so different from writing a Kubernetes charm, but it is a little bit different. As such, our tutorial comes in two basic flavors, for machines and for Kubernetes. The choice is yours!

  • Write your first machine charm
  • From zero to hero: Write your first Kubernetes charm
Copyright © 2025, Canonical Ltd.
Last updated on Jun 19, 2025
Show source
Ask a question on Discourse
Ask a question on Matrix
Open a GitHub issue for this page
Edit this page on GitHub
Contents
  • Tutorials