Kubernetes vs. non-Kubernetes bundles

Bundle > Kubernetes vs. non-Kubernetes bundles

This document describes the bundle.yaml file for a non-Kubernetes (machine) as opposed to a Kubernetes bundle.

Contents:

Non-Kubernetes bundles

A non-Kubernetes bundle, for example, the kubernetes-core bundle, looks as follows:

description: A highly-available, production-grade Kubernetes cluster.
issues: https://bugs.launchpad.net/charmed-kubernetes-bundles
series: jammy
source: https://github.com/charmed-kubernetes/bundle
website: https://ubuntu.com/kubernetes/charmed-k8s
name: charmed-kubernetes
applications:
  calico:
    annotations:
      gui-x: '475'
      gui-y: '605'
    channel: 1.26/stable
    charm: calico
    options:
      vxlan: Always
  containerd:
    annotations:
      gui-x: '475'
      gui-y: '800'
    channel: 1.26/stable
    charm: containerd
  easyrsa:
    annotations:
      gui-x: '90'
      gui-y: '420'
    channel: 1.26/stable
    charm: easyrsa
    constraints: cores=1 mem=4G root-disk=16G
    num_units: 1
  etcd:
    annotations:
      gui-x: '800'
      gui-y: '420'
    channel: 1.26/stable
    charm: etcd
    constraints: cores=2 mem=8G root-disk=16G
    num_units: 3
    options:
      channel: 3.4/stable
  kubeapi-load-balancer:
    annotations:
      gui-x: '450'
      gui-y: '250'
    channel: 1.26/stable
    charm: kubeapi-load-balancer
    constraints: cores=1 mem=4G root-disk=16G
    expose: true
    num_units: 1
  kubernetes-control-plane:
    annotations:
      gui-x: '800'
      gui-y: '850'
    channel: 1.26/stable
    charm: kubernetes-control-plane
    constraints: cores=2 mem=8G root-disk=16G
    num_units: 2
    options:
      channel: 1.26/stable
  kubernetes-worker:
    annotations:
      gui-x: '90'
      gui-y: '850'
    channel: 1.26/stable
    charm: kubernetes-worker
    constraints: cores=2 mem=8G root-disk=16G
    expose: true
    num_units: 3
    options:
      channel: 1.26/stable
relations:
- - kubernetes-control-plane:loadbalancer-external
  - kubeapi-load-balancer:lb-consumers
- - kubernetes-control-plane:loadbalancer-internal
  - kubeapi-load-balancer:lb-consumers
- - kubernetes-control-plane:kube-control
  - kubernetes-worker:kube-control
- - kubernetes-control-plane:certificates
  - easyrsa:client
- - etcd:certificates
  - easyrsa:client
- - kubernetes-control-plane:etcd
  - etcd:db
- - kubernetes-worker:certificates
  - easyrsa:client
- - kubeapi-load-balancer:certificates
  - easyrsa:client
- - calico:etcd
  - etcd:db
- - calico:cni
  - kubernetes-control-plane:cni
- - calico:cni
  - kubernetes-worker:cni
- - containerd:containerd
  - kubernetes-worker:container-runtime
- - containerd:containerd
  - kubernetes-control-plane:container-runtime

Kubernetes bundles

A Kubernetes bundle differs from a standard bundle in the following ways:

  • key ‘bundle’ is given the value of ‘kubernetes’
  • key ‘num_units’ is replaced by key ‘scale’
  • key ‘to’ is replaced by key ‘placement’

The value of ‘placement’ is a key=value pair and is used as a Kubernetes node selector.

For example:

bundle: kubernetes
applications:
  postgresql:
    charm: postgresql-k8s
    scale: 3
    constraints: mem=1G
    storage:
      database: postgresql-pv,20M
  mattermost:
    charm: mattermost-k8s
    placement: foo=bar
    scale: 1
relations:
  - - postgresql:db
    - mattermost:db

Last updated 8 months ago. Help improve this document in the forum.