Skip to content

Flatcar

Here are sensible defaults variables to use when deploying on Flatcar.

Requirements

Set bootstrap_python: true to install checksum-verified CPython 3.14.7 from python-build-standalone. The bootstrap runs before fact gathering, supports amd64 and arm64, and selects /opt/bin/python. It replaces the obsolete Python 3.6 / PyPy bootstrap. Use a current Flatcar stable image with cgroup v2.

Sample configuration

---
# bootstrap_python: false
# Install portable python distribution that do not provide python (eg.
# coreos/flatcar):
bootstrap_python: true
ansible_python_interpreter: /opt/bin/python

ansible_ssh_user: core

ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
# To use a bastion host between node and ansible use:
# ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o ProxyCommand="ssh -o StrictHostKeyChecking=no -W %h:%p -q ubuntu@{{ ansible_ssh_bastion_host }}"'
# ansible_ssh_bastion_host: __BASTION_IP__

kubeadm_version: "{{ kubernetes_version }}"
# renovate: datasource=github-releases depName=kubernetes/kubernetes
kubernetes_version: v1.37.0
# If deploying HA clusters, specify the loadbalancer IP or domain name and port
# in front of the control plane nodes:
# kubernetes_api_server_address: __LB_HOSTNAME__
# kubernetes_api_server_port: __LB_LISTENER_PORT__

bin_dir: /opt/bin
# Change default path for custom binary. On OS with immutable file system (eg.
# coreos/flatcar) use a writable path
# bin_dir: /opt/bin

# Customize API server
kubeadm_api_server_extra_args: []
kubeadm_api_server_extra_volumes: []

# Customize controller manager scheduler
# eg. to publish prometheus metrics on "0.0.0.0":
# kubeadm_controller_manager_extra_args:
#   - name: bind-address
#     value: 0.0.0.0
kubeadm_controller_manager_extra_args:
  - name: flex-volume-plugin-dir
    value: "/opt/libexec/kubernetes/kubelet-plugins/volume/exec/"
kubeadm_controller_manager_extra_volumes: []

# Customize scheduler manager scheduler
# eg. to publish prometheus metrics on "0.0.0.0":
# kubeadm_scheduler_extra_args:
#   - name: bind-address
#     value: 0.0.0.0
kubeadm_scheduler_extra_volumes: []
kubeadm_scheduler_extra_args: []

# Customize Kubelet
# `kubeadm_kubelet_extra_args` is to be used as a last resort,
# `kubeadm_kubelet_component_config` configure kubelet wth native kubeadm API,
# please see
# https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for
# more information
kubeadm_kubelet_component_config:
  volumePluginDir: "/opt/libexec/kubernetes/kubelet-plugins/volume/exec/"
kubeadm_kubelet_extra_args: []

# Customize Kube Proxy configuration using native Kubeadm API
# eg. to publish prometheus metrics on "0.0.0.0":
# kubeadm_kube_proxy_component_config:
#   metricsBindAddress: 0.0.0.0
kubeadm_kube_proxy_component_config: {}

# Additionnal subject alternative names for the API server
# eg. to add aditionnals domains:
# kubeadm_api_server_cert_extra_sans:
#   - mydomain.example.com
kubeadm_api_server_cert_extra_sans: []

kubeadm_cluster_name: symplegma

# Do not label master nor taint (skip kubeadm phase)
# kubeadm_mark_control_plane: false

# Enable systemd cgroup for Kubelet and container runtime
# DO NOT CHANGE this on an existing cluster: Changing the cgroup driver of a
# Node that has joined a cluster is strongly not recommended. If the kubelet
# has created Pods using the semantics of one cgroup driver, changing the
# container runtime to another cgroup driver can cause errors when trying to
# re-create the Pod sandbox for such existing Pods. Restarting the kubelet may
# not solve such errors. The default is systemd.
systemd_cgroup: true

container_runtime: containerd