---
title: Charmhub | Deploy Kubernetes using Charmhub - The Open Operator Collection
description: Deploy the latest version of Kubernetes on any cloud.
url: https://charmhub.io/k8s/configurations
---

# Kubernetes

[Canonical Kubernetes](https://charmhub.io/publisher/containers "View all packages from Canonical Kubernetes")

* [Canonical Kubernetes](https://charmhub.io/publisher/containers "View all packages from Canonical Kubernetes")

Platform:

26.04

24.04

22.04

20.04

1.32/stable 1918

```
juju deploy k8s --channel 1.32/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [bootstrap-datastore](https://charmhub.io/k8s/configurations#bootstrap-datastore)
* [bootstrap-node-taints](https://charmhub.io/k8s/configurations#bootstrap-node-taints)
* [bootstrap-pod-cidr](https://charmhub.io/k8s/configurations#bootstrap-pod-cidr)
* [bootstrap-service-cidr](https://charmhub.io/k8s/configurations#bootstrap-service-cidr)
* [cluster-annotations](https://charmhub.io/k8s/configurations#cluster-annotations)
* [containerd-custom-registries](https://charmhub.io/k8s/configurations#containerd-custom-registries)
* [datastore-extra-args](https://charmhub.io/k8s/configurations#datastore-extra-args)
* [dns-cluster-domain](https://charmhub.io/k8s/configurations#dns-cluster-domain)
* [dns-enabled](https://charmhub.io/k8s/configurations#dns-enabled)
* [dns-service-ip](https://charmhub.io/k8s/configurations#dns-service-ip)
* [dns-upstream-nameservers](https://charmhub.io/k8s/configurations#dns-upstream-nameservers)
* [gateway-enabled](https://charmhub.io/k8s/configurations#gateway-enabled)
* [ingress-enable-proxy-protocol](https://charmhub.io/k8s/configurations#ingress-enable-proxy-protocol)
* [ingress-enabled](https://charmhub.io/k8s/configurations#ingress-enabled)
* [kube-apiserver-extra-args](https://charmhub.io/k8s/configurations#kube-apiserver-extra-args)
* [kube-apiserver-extra-sans](https://charmhub.io/k8s/configurations#kube-apiserver-extra-sans)
* [kube-controller-manager-extra-args](https://charmhub.io/k8s/configurations#kube-controller-manager-extra-args)
* [kube-proxy-extra-args](https://charmhub.io/k8s/configurations#kube-proxy-extra-args)
* [kube-scheduler-extra-args](https://charmhub.io/k8s/configurations#kube-scheduler-extra-args)
* [kubelet-extra-args](https://charmhub.io/k8s/configurations#kubelet-extra-args)
* [load-balancer-bgp-local-asn](https://charmhub.io/k8s/configurations#load-balancer-bgp-local-asn)
* [load-balancer-bgp-mode](https://charmhub.io/k8s/configurations#load-balancer-bgp-mode)
* [load-balancer-bgp-peer-address](https://charmhub.io/k8s/configurations#load-balancer-bgp-peer-address)
* [load-balancer-bgp-peer-port](https://charmhub.io/k8s/configurations#load-balancer-bgp-peer-port)
* [load-balancer-cidrs](https://charmhub.io/k8s/configurations#load-balancer-cidrs)
* [load-balancer-enabled](https://charmhub.io/k8s/configurations#load-balancer-enabled)
* [load-balancer-l2-interfaces](https://charmhub.io/k8s/configurations#load-balancer-l2-interfaces)
* [load-balancer-l2-mode](https://charmhub.io/k8s/configurations#load-balancer-l2-mode)
* [local-storage-enabled](https://charmhub.io/k8s/configurations#local-storage-enabled)
* [local-storage-local-path](https://charmhub.io/k8s/configurations#local-storage-local-path)
* [local-storage-reclaim-policy](https://charmhub.io/k8s/configurations#local-storage-reclaim-policy)
* [metrics-server-enabled](https://charmhub.io/k8s/configurations#metrics-server-enabled)
* [network-enabled](https://charmhub.io/k8s/configurations#network-enabled)
* [node-labels](https://charmhub.io/k8s/configurations#node-labels)
* [unready-pod-namespaces](https://charmhub.io/k8s/configurations#unready-pod-namespaces)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* bootstrap-datastore | string

  The datastore to use in Canonical Kubernetes.
  This can only be reset after deployment.

  Allowed values are "", managed-etcd, dqlite and etcd.

  + "": The charm will automatically bootstrap with the default
    datastore managed by the k8s snap.
  + managed-etcd: The charm will bootstrap with a managed-etcd datastore.
  + dqlite: The charm will bootstrap with a k8s-dqlite datastore.
    [Warning] `k8s-dqlite` is deprecated and will be removed
    from Canonical Kubernetes in 1.36 without a migration path.
    New deployments should refrain from using this option.
  + etcd: The charm will bootstrap with an external etcd datastore.
    The charm will block until the etcd charm is integrated.
* bootstrap-node-taints | string

  Space-separated list of taints to apply to this node at registration time.

  This config is only used at bootstrap time when Kubelet first registers the
  node with Kubernetes. To change node taints after deploy time, use kubectl
  instead.

  For more information, see the upstream Kubernetes documentation about
  taints:
  https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
* bootstrap-pod-cidr | string

  Comma-separated CIDR blocks for IP addresses that can be assigned
  to pods within the cluster. Can contain at most 2 blocks, one for IPv4
  and one for IPv6. If the value is "", the snap will automatically
  assign a CIDR block for the pods.

  After deployment it is not possible to change the size of
  the IP range.

  Examples:

  + "192.0.2.0/24"
  + "2001:db8::/32"
  + "192.0.2.0/24,2001:db8::/32"
  + "2001:db8::/32,192.0.2.0/24"
* bootstrap-service-cidr | string

  Comma-separated CIDR blocks for IP addresses that can be assigned
  to services within the cluster. Can contain at most 2 blocks, one for IPv4
  and one for IPv6. If the value is "", the snap will automatically
  assign a CIDR block for the services.

  After deployment it is not possible to change the size of
  the IP range.

  + "" - The charm will bootstrap with the defaults from the k8s snap
  + "192.0.2.0/24"
  + "2001:db8::/32"
  + "192.0.2.0/24,2001:db8::/32"
  + "2001:db8::/32,192.0.2.0/24"
* cluster-annotations | string

  Space-separated list of (key/value) pairs) that can be
  used to add arbitrary metadata configuration to the Canonical
  Kubernetes cluster. For more information, see the upstream Canonical
  Kubernetes documentation about annotations:

  https://documentation.ubuntu.com/canonical-kubernetes/latest/src/snap/reference/annotations/

  Example:
  e.g.: key1=value1 key2=value2
* containerd-custom-registries | string

  Default: []

  Registry endpoints and credentials. Setting this config allows containerd
  to pull images from registries where auth is required.

  The value for this config must be a JSON array of credential objects, like this:
  e.g.: [{"url": "https://registry.example.com", "host": "my.registry:port", "username": "user", "password": "pass"}]

  Credential Object Parameters:
  url: REQUIRED str
  the URL to the registry, include the port if not it isn't implied from the schema.
  e.g: "url": "https://my.registry:8443"
  e.g: "url": "http://my.registry"

  host: OPTIONAL str - defaults to auto-generated from the url
  could be registry host address or a name
  e.g.: myregistry.io:9000, 10.10.10.10:5432
  e.g.: myregistry.io, myregistry
  Note: It will be derived from `url` if not provided.
  e.g.: "url": "http://10.10.10.10:8000" --> "host": "10.10.10.10:8000"

  username: OPTIONAL str - default ''
  password: OPTIONAL str - default ''
  identitytoken: OPTIONAL str - default ''
  Used by containerd for basic authentication to the registry.

  ca\_file: OPTIONAL str - default ''
  cert\_file: OPTIONAL str - default ''
  key\_file: OPTIONAL str - default ''
  For ssl/tls communication these should be a base64 encoded file
  e.g.: "ca\_file": "'"$(base64 -w 0 < my.custom.registry.pem)"'"

  skip\_verify: OPTIONAL bool - default false
  For situations where the registry has self-signed or expired certs and a quick work-around is necessary.
  e.g.: "skip\_verify": true

  Example config:
  juju config k8s containerd\_custom\_registries='[{
  "url": "https://registry.example.com",
  "host": "ghcr.io",
  "ca\_file": "'"$(base64 -w 0 < ~/my.custom.ca.pem)"'",
  "cert\_file": "'"$(base64 -w 0 < ~/my.custom.cert.pem)"'",
  "key\_file": "'"$(base64 -w 0 < ~/my.custom.key.pem)"'",
  }]'
* datastore-extra-args | string

  Space separated list of flags and key=value pairs that will be passed as arguments to
  datastore if managed-etcd or dqlite is set as datastore.

  Notes:
  Options may only be set on charm deployment

  For example a value like this:
  --heartbeat-interval=100 listen-peer-urls=http://10.0.0.1:2380
  will result in kube-controller-manager being run with the following options:
  --heartbeat-interval=100 --listen-peer-urls=http://10.0.0.1:2380
* dns-cluster-domain | string

  Default: cluster.local

  Sets the local domain of the cluster
* dns-enabled | boolean

  Default: True

  Enable/Disable the DNS feature on the cluster.
* dns-service-ip | string

  Sets the IP address of the dns service. If omitted defaults to the IP address
  of the Kubernetes service created by the feature.

  Can be used to point to an external dns server when feature is disabled.
* dns-upstream-nameservers | string

  Space-separated list of upstream nameservers used to forward queries for out-of-cluster
  endpoints.

  If omitted defaults to `/etc/resolv.conf` and uses the nameservers on each node.
* gateway-enabled | boolean

  Enable/Disable the gateway feature on the cluster.
* ingress-enable-proxy-protocol | boolean

  Determines if the proxy protocol should be enabled for ingresses.
* ingress-enabled | boolean

  Determines if the ingress feature should be enabled.
* kube-apiserver-extra-args | string

  Space separated list of flags and key=value pairs that will be passed as arguments to
  kube-apiserver.

  Notes:
  Options may only be set on charm deployment

  For example a value like this:
  runtime-config=batch/v2alpha1=true profiling=true
  will result in kube-apiserver being run with the following options:
  --runtime-config=batch/v2alpha1=true --profiling=true
* kube-apiserver-extra-sans | string

  Space separated list of extra Subject Alternative Names for the kube-apiserver
  self-signed certificates.

  Examples:

  + "kubernetes"
  + "kubernetes.default.svc"
  + "kubernetes.default.svc.cluster.local"
* kube-controller-manager-extra-args | string

  Space separated list of flags and key=value pairs that will be passed as arguments to
  kube-controller-manager.

  Notes:
  Options may only be set on charm deployment
  cluster-name: cannot be overridden

  For example a value like this:
  runtime-config=batch/v2alpha1=true profiling=true
  will result in kube-controller-manager being run with the following options:
  --runtime-config=batch/v2alpha1=true --profiling=true
* kube-proxy-extra-args | string

  Space separated list of flags and key=value pairs that will be passed as arguments to
  kube-proxy.

  For example a value like this:
  runtime-config=batch/v2alpha1=true profiling=true
  will result in kube-proxy being run with the following options:
  --runtime-config=batch/v2alpha1=true --profiling=true
* kube-scheduler-extra-args | string

  Space separated list of flags and key=value pairs that will be passed as arguments to
  kube-scheduler.

  Notes:
  Options may only be set on charm deployment

  For example a value like this:
  runtime-config=batch/v2alpha1=true profiling=true
  will result in kube-scheduler being run with the following options:
  --runtime-config=batch/v2alpha1=true --profiling=true
* kubelet-extra-args | string

  Space separated list of flags and key=value pairs that will be passed as arguments to
  kubelet.

  For example a value like this:
  runtime-config=batch/v2alpha1=true profiling=true
  will result in kubelet being run with the following options:
  --runtime-config=batch/v2alpha1=true --profiling=true
* load-balancer-bgp-local-asn | int

  Default: 64512

  Local ASN for the load balancer. This is only used if load-balancer-bgp-mode
  is set to true.
* load-balancer-bgp-mode | boolean

  Enable/Disable BGP mode for the load balancer. This is only used if
  load-balancer-enabled is set to true.
* load-balancer-bgp-peer-address | string

  Address of the BGP peer for the load balancer. This is only used if
  load-balancer-bgp-mode is set to true.
* load-balancer-bgp-peer-port | int

  Default: 179

  Port of the BGP peer for the load balancer. This is only used if
  load-balancer-bgp-mode is set to true.
* load-balancer-cidrs | string

  Space-separated list of CIDRs to use for the load balancer. This is
  only used if load-balancer-enabled is set to true.
* load-balancer-enabled | boolean

  Enable/Disable the load balancer feature on the cluster.
* load-balancer-l2-interfaces | string

  Space-separated list of interfaces to use for the load balancer. This
  is only used if load-balancer-l2-mode is set to true. if unset, all
  interfaces will be used.
* load-balancer-l2-mode | boolean

  Enable/Disable L2 mode for the load balancer. This is only used if
  load-balancer-enabled is set to true.
* local-storage-enabled | boolean

  Default: True

  Enable local storage provisioning. This will create a storage class
  named "local-storage" that uses the hostPath provisioner. This is
  useful for development and testing purposes. It is not recommended for
  production use.
* local-storage-local-path | string

  Default: /var/snap/k8s/common/rawfile-storage

  The path on the host where local storage will be provisioned. This
  path must be writable by the kubelet. This is only used if
  local-storage.enabled is set to true.
* local-storage-reclaim-policy | string

  Default: Delete

  The reclaim policy for local storage. This can be either "Delete" or
  "Retain". If set to "Delete", the storage will be deleted when the
  PersistentVolumeClaim is deleted. If set to "Retain", the storage will
  be retained when the PersistentVolumeClaim is deleted.
* metrics-server-enabled | boolean

  Default: True

  Enable/Disable the metrics-server feature on the cluster.
* network-enabled | boolean

  Default: True

  Enables or disables the network feature.
* node-labels | string

  Labels can be used to organize and to select subsets of nodes in the
  cluster. Declare node labels in key=value format, separated by spaces.
* unready-pod-namespaces | string

  Default: kube-system metallb-system

  Space-separated list of namespaces to check for unready pods. This
  is used to determine the status of the cluster and its components.
  If not set, no namespaces will be checked.
