Skip to content
Install the CLI

Reference Clusters and instances

Flavors and capabilities

These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.

Every Kubernetes provider comes with a different set of built-in features: a managed cloud cluster like EKS or GKE handles control-plane components and load balancers for you, while a local kind or bare-metal cluster leaves more for you to install. A Kix flavor (kix.flavors.<name>) is a ready-made preset you include at the top of kix.buildCluster so Kix knows what your cluster already provides and what capabilities your nodes support.

Include a flavor as the first module in kix.buildCluster:

{ kix, packages }:
kix.buildCluster {
specialArgs = { inherit kix packages; };
modules = [
kix.flavors.eks
./platform.nix
./services.nix
];
}

Every setting in a flavor uses lib.mkDefault, so your cluster modules can override any capability, role binding, or network setting when your cluster differs from the stock distribution.

Choose the flavor that matches how your Kubernetes cluster was installed. Flavors describe the distribution or cloud control plane; add storage drivers, virtualization, and other add-ons as Kix packages. Your packages supply roles the flavor marks absent or replace platform defaults marked shadowable (see cluster roles). Claiming a role marked exclusive fails evaluation.

FlavorChoose it whenIt assumesYou provide
aksRunning on Azure Kubernetes Service (AKS)Managed control plane, Azure CNI (exclusive), Azure Load Balancer (shadowable), managed-csi default StorageClass (shadowable), and metrics API (exclusive)Optional replacements for managed-csi or Azure Load Balancer
eksRunning on Amazon EKS (Deploy to EKS)Multi-node (multiNode = true), managed control plane, aws-vpc-cni (exclusive), and classic ELBs from the EKS service controller (shadowable)The aws-ebs-csi-driver add-on plus a storage-classes instance or an imported gp2 StorageClass (storageClasses is absent; EKS creates gp2 without marking it as the default), and metricsApi (absent). Install the AWS Load Balancer Controller with Helm if you need it (not an EKS add-on)
gkeRunning on GKE Standard (Deploy to GKE)Multi-node (multiNode = true), managed control plane, GKE Dataplane V2 (exclusive), GCP Network Load Balancer (shadowable), standard-rwo default StorageClass, metrics API (exclusive), critical PriorityClasses only in kube-system, and gpu = false by defaultOptional load balancer replacement; set cluster.capabilities.gpu = true for GPU node pools
gke-autopilotRunning on GKE Autopilot (Deploy to GKE)Multi-node (multiNode = true), managed control plane, node autoscaling, baseline Pod Security (enforced by GKE’s admission webhook), standard-rwo default StorageClass, platform imports in gke-managed, DaemonSets allowed, no privileged containers or host access, and no critical PriorityClassesUnprivileged packages without host access or critical PriorityClasses
k3sInstalled with k3sFlannel (exclusive), ServiceLB (exclusive), local-path default StorageClass (shadowable), bundled metrics-server (exclusive), pod CIDR 10.42.0.0/16, and k3s containerd pathsOptional storageClasses replacement (if k3s runs with --disable local-storage, override cluster.roles.storageClasses.binding)
kindRunning a local kind clusterSingle node (multiNode = false), kindnet (exclusive), and standard default StorageClass (shadowable)Any needed absent roles: loadBalancer, metricsApi, snapshotController, gatewayApi, and registryMirror
kubeadmInstalled with upstream kubeadmControl plane and CoreDNS (shadowable); privileged containers and DaemonSets allowedCNI, storageClasses, loadBalancer, and metricsApi (all absent)
openshiftRunning on Red Hat OpenShiftOVN-Kubernetes (exclusive), CoreDNS dns-default in openshift-dns, metrics from openshift-monitoring (exclusive), restricted Pod Security, and no privileged containersstorageClasses and loadBalancer (absent by default); unprivileged packages compatible with restricted Pod Security
ovhRunning on OVHcloud MKSMulti-node managed control plane, Canal (exclusive), csi-cinder-high-speed default StorageClass (shadowable), and OVH load balancer (shadowable)Optional storage or load balancer replacement
rke2Installed with RKE2CNI from cluster.flavor.rke2.cni (default [ "canal" ], exclusive), rke2-metrics-server (exclusive), rke2-snapshot-controller (exclusive), and pod CIDR 10.42.0.0/16storageClasses and loadBalancer (both absent); a cilium instance in kube-system to configure RKE2’s bundled Cilium when cni includes "cilium"
scalewayRunning on Scaleway KapsuleMulti-node managed control plane, Kapsule-managed Cilium (exclusive), sbs-default default StorageClass (shadowable), and Scaleway load balancer (shadowable)Optional storage or load balancer replacement
talosNodes run Talos LinuxFlannel (exclusive) and containerd registry config at /etc/cri/conf.d/hostsstorageClasses, loadBalancer, and metricsApi (all absent)

Self-managed on-premises cluster with ZFS, KubeVirt, and OpenEBS

Section titled “Self-managed on-premises cluster with ZFS, KubeVirt, and OpenEBS”

There is no separate bare-metal or on-premises flavor. Pick kubeadm, k3s, rke2, or talos to match how you installed Kubernetes, then add packages for your storage and virtualization stack. All four flavors allow the privileged containers and DaemonSets that the experimental packages below require:

  • ZFS (packages.experimental.zfs-localpv): Installs the OpenEBS LocalPV-ZFS CSI driver to provision ZFS datasets or zvols on an existing per-node pool (config.storageClasses.<name>.parameters.poolname). The driver runs privileged and as root (meta.unsafe = [ "privileged" "run-as-root" ]), and its node plugin runs zfs on the host via chroot /host. Set config.node.zfsBin when zfs is outside /sbin/zfs and /usr/sbin/zfs, and config.node.nodeSelector when only some nodes carry the pool. Add aliases = [ "storageClasses" ] to make it the cluster’s StorageClass provider. That fills the absent role on kubeadm, rke2, and talos. On k3s, Kix refuses a second default-annotated StorageClass alongside local-path, so either keep local-path as default or disable k3s local storage and set cluster.roles.storageClasses.binding = "absent". Creating VolumeSnapshotClass resources requires a snapshot controller (rke2 imports its own; on other flavors, add packages.experimental.snapshot-controller).
  • KubeVirt (packages.experimental.kubevirt): Runs virtual machines as pods (install one instance per cluster). Because virt-handler runs privileged, as root, and in the host PID namespace, Kix gives its namespace the privileged Pod Security level. Nodes need /dev/kvm; on nodes without it, set config.extraSpec.configuration.developerConfiguration.useEmulation = true on the instance. Add packages.experimental.cdi to import VM disks through dataVolumeTemplates.
  • OpenEBS: Kix packages two OpenEBS engines: LocalPV-ZFS (packages.experimental.zfs-localpv) and Mayastor (packages.experimental.mayastor, which serves replicated block storage over NVMe-oF from DiskPool devices on labeled nodes). Kix does not package other OpenEBS engines (such as LocalPV-Hostpath or LocalPV-LVM) today.
modules = [
kix.flavors.kubeadm
{
instances.storage = {
zfs-localpv = {
package = packages.experimental.zfs-localpv;
aliases = [ "storageClasses" ];
config.storageClasses.zfs.parameters.poolname = "tank/k8s";
};
};
instances.kubevirt = {
kubevirt.package = packages.experimental.kubevirt;
cdi.package = packages.experimental.cdi;
};
}
];

Kix ships 12 built-in flavor modules under kix.flavors:

Flavorcluster.providerTarget environmentNotable flavor defaults
kix.flavors.aks"aks"Azure Kubernetes ServiceSets multiNode = true and discardUnpackedLayers = false, with a managed control plane, Azure CNI, Azure Load Balancer, and managed-csi StorageClass.
kix.flavors.eks"eks"Amazon EKSSets multiNode = true and discardUnpackedLayers = true, binds storageClasses and metricsApi as "absent", and assumes a managed control plane, aws-vpc-cni, and the EKS cloud load balancer. Adds cluster.flavor.eks.networkPolicy (default "none"; set "vpc-cni" after enabling network policy in the Amazon VPC CNI add-on). Setting networkPolicy.enable = true while cluster.flavor.eks.networkPolicy is "none" fails the build.
kix.flavors.gke"gke"Google Kubernetes Engine (Standard)Sets multiNode = true, criticalPriorityNamespaces = [ "kube-system" ], and registryConfigPath = "/etc/containerd/hosts.d", with a managed control plane, GKE Dataplane V2, GCP Network Load Balancer, and standard-rwo StorageClass. Default GKE nodes do not configure containerd to read /etc/containerd/hosts.d, so containerd uses that path only if you enable it in GKE’s containerd configuration or a node startup script.
kix.flavors.gke-autopilot"gke-autopilot"Google Kubernetes Engine (Autopilot)Sets multiNode = true, daemonSets = true, privilegedContainers = false, nodeAutoscaling = true, podSecurityEnforcement = "baseline", and criticalPriorityNamespaces = [ ]. Places platform imports in gke-managed because Autopilot blocks user resources in kube-system.
kix.flavors.k3s"k3s"k3sSets podCidr = "10.42.0.0/16", k3s containerd paths under /run/k3s and /var/lib/rancher/k3s, Flannel CNI, ServiceLB, local-path StorageClass, and metrics-server.
kix.flavors.kind"kind"kind (Kubernetes in Docker)Sets multiNode = false, availabilityZones = [ ], podCidr = "10.244.0.0/16", kindnet CNI, standard StorageClass, and platform network policy intents for CoreDNS and local-path-provisioner.
kix.flavors.kubeadm"kubeadm"Upstream kubeadmMarks cni, storageClasses, loadBalancer, and metricsApi as "absent" so Kix packages can provide them; imports platform-dns.
kix.flavors.openshift"openshift"Red Hat OpenShiftSets privilegedContainers = false, podSecurityEnforcement = "restricted", ovn-kubernetes CNI, openshift-monitoring for metricsApi, and CoreDNS at dns-default.openshift-dns.svc.
kix.flavors.ovh"ovh"OVHcloud Managed Kubernetes (MKS)Sets multiNode = true, managedControlPlane = true, Canal CNI, csi-cinder-high-speed StorageClass, and paid OVH load balancer ("shadowable").
kix.flavors.rke2"rke2"RKE2Exposes cluster.flavor.rke2.cni (default [ "canal" ]), sets podCidr = "10.42.0.0/16", RKE2 containerd paths, rke2-snapshot-controller import, and kube-system platform network policy intents.
kix.flavors.scaleway"scaleway"Scaleway KapsuleSets multiNode = true, managedControlPlane = true, Kapsule-managed Cilium CNI ("exclusive"), sbs-default StorageClass, and discardUnpackedLayers = false.
kix.flavors.talos"talos"Talos LinuxSets Flannel CNI ("exclusive"), storageClasses, loadBalancer, and metricsApi as "absent", and /etc/cri/conf.d/hosts for containerd registry mirrors.

The rke2 flavor adds the option cluster.flavor.rke2.cni (listOf ("multus" | "canal" | "calico" | "cilium" | "flannel" | "none"), default [ "canal" ]). Set it to match the cni list in your RKE2 server configuration:

  • "canal", "calico", or "flannel": binds cluster.roles.cni as "exclusive".
  • "cilium": binds cluster.roles.cni as "shadowable" and declares instances.kube-system.platform-cilium with out.helmChartConfig = { name = "rke2-cilium"; namespace = "kube-system"; }, allowing a packages.experimental.cilium instance to configure RKE2’s bundled Cilium chart via a HelmChartConfig resource.
  • [ "none" ]: binds cluster.roles.cni as "absent" so a managed CNI can be installed from scratch.
  • "multus" may precede one primary CNI (for example, [ "multus" "cilium" ]).

Each flavor sets defaults under cluster.capabilities and cluster.containerd. Cells marked null are left unset by the flavor so you can declare them per cluster (for example, multiNode and availabilityZones, which depend on your node pools). For standard NetworkPolicy enforcement limits on gke, gke-autopilot, and eks, see Known limits by platform.

FlavormultiNodeavailabilityZonesmanagedControlPlanenodeAutoscalingprivilegedContainersdaemonSetspodSecurityEnforcementcontainerd.discardUnpackedLayers
akstruenulltruefalsetruetruenullfalse
ekstruenulltruefalsetruetruenulltrue
gketruenulltruefalsetruetruenulltrue
gke-autopilottruenulltruetruefalsetrue"baseline"null
k3snullnullfalsefalsetruetruenullfalse
kindfalse[ ]falsefalsetruetruenulltrue
kubeadmnullnullfalsefalsetruetruenullnull
openshiftnullnullfalsefalsefalsetrue"restricted"null
ovhtruenulltruefalsetruetruenullnull
rke2nullnullfalsefalsetruetruenullfalse
scalewaytruenulltruefalsetruetruenullfalse
talosnullnullfalsefalsetruetruenulltrue

gke also sets cluster.capabilities.gpu = false by default (override to true when attaching a GPU node pool).

gke also sets cluster.capabilities.criticalPriorityNamespaces = [ "kube-system" ] (all other flavors leave it null). GKE allows pods with the built-in system-node-critical or system-cluster-critical PriorityClass only in namespaces that have a ResourceQuota for those classes. On GKE Standard, GKE creates that quota (gcp-critical-pods) in kube-system and in its own gke-managed-* namespaces. Users do not deploy into gke-managed-* namespaces, so Kix lists only kube-system. In a namespace without that quota, Kubernetes accepts the workload and rejects every pod it creates, so Kix fails the build when a workload uses either class outside criticalPriorityNamespaces. To allow critical pods in another namespace, create a ResourceQuota there whose scopeSelector includes both system-node-critical and system-cluster-critical (like gcp-critical-pods), and add the namespace to cluster.capabilities.criticalPriorityNamespaces. Include both classes in the quota even if your workload uses only one. criticalPriorityNamespaces allows both classes in every listed namespace, while GKE checks each class separately and still rejects any class the quota leaves out.

gke-autopilot sets cluster.capabilities.criticalPriorityNamespaces = [ ], so workloads cannot use system-node-critical or system-cluster-critical in any namespace. Like GKE Standard, Autopilot rejects both classes in namespaces without a matching ResourceQuota, and it also blocks user workloads in kube-system.

On gke-autopilot, GKE’s admission webhook enforces every rule of the baseline Pod Security Standard without using Pod Security Admission namespace labels: it blocks privileged containers, host namespaces such as hostNetwork, and writable hostPath volumes. Because of this, the flavor sets podSecurityEnforcement = "baseline" and privilegedContainers = false. When you deploy a Deployment, Autopilot also mutates the Deployment itself to add an ephemeral-storage request and raise container resource requests below its minimums (for example, raising a 32Mi memory request to 52Mi). After the deploy, kix plan skips unchanged resources and reports no difference, whereas kix plan --reconcile dry-runs every resource and warns about each request value that Autopilot changed from the build.

GKE enables NodeLocal DNSCache by default starting in version 1.34.1, and always on Autopilot. Both gke and gke-autopilot include it in platform-dns (k8s-app: node-local-dns in kube-system and 169.254.20.10/32) so generated network policies allow DNS queries to the node-local cache.

Kix does not model these GKE features in the gke flavor:

  • Google Cloud Managed Service for Prometheus, which reads monitoring.googleapis.com resources and ignores the ServiceMonitor and PrometheusRule resources that kix.monitor generates.
  • GKE’s default Service CIDR (cluster.network.serviceCidr is null), which since GKE 1.27 uses a Google-owned IP range outside RFC 1918 private space.

Each flavor configures cluster.roles.<role>.binding. gke and gke-autopilot bind network-policy-enforcer as "exclusive" (GKE Dataplane V2), and eks binds it as "exclusive" (Amazon VPC CNI) when cluster.flavor.eks.networkPolicy = "vpc-cni". Adding a cilium instance on those clusters fails the build. Other flavors leave network-policy-enforcer unbound, so add an enforcer package such as packages.experimental.cilium when setting networkPolicy.enable = true.

FlavorcnidnsstorageClassesloadBalancermetricsApisnapshotControllergatewayApiregistryMirror
aksexclusive (azure-cni)shadowableshadowableshadowable (azure-lb)exclusivenullnullnull
eksexclusive (aws-vpc-cni)shadowableabsentshadowable (aws-cloud-provider)absentnullnullnull
gkeexclusive (gke-native)shadowableshadowableshadowable (gcp-network-lb)exclusivenullnullnull
gke-autopilotexclusive (gke-native)shadowableshadowableexclusive (gcp-network-lb)exclusivenullnullnull
k3sexclusive (flannel)shadowableshadowableexclusive (servicelb)exclusivenullnullnull
kindexclusive (kindnet)shadowableshadowableabsentabsentabsentabsentabsent
kubeadmabsentshadowableabsentabsentabsentnullnullnull
openshiftexclusive (ovn-kubernetes)shadowableabsentabsentexclusive (openshift-monitoring)nullnullnull
ovhexclusive (canal)shadowableshadowableshadowable (ovh-loadbalancer)nullnullnullnull
rke2via rke2.cni (default exclusive canal)shadowableabsentabsentexclusive (rke2-metrics-server)exclusive (rke2-snapshot-controller)nullnull
scalewayexclusive (cilium)shadowableshadowableshadowable (scaleway-lb)nullnullnullnull
talosexclusive (flannel)shadowableabsentabsentabsentnullnullnull

Flavors declare kix.mkImport instances to represent services and CRDs that the platform installs out of band. Because dependency resolution prefers managed instances over imports, deploying a managed package that claims the same role (such as packages.experimental.coredns or packages.storage-classes) shadows a "shadowable" platform import automatically.

Import instanceClaimed roleDeclared by flavorsoptionalPurpose
kube-system/platform-dns (gke-managed/platform-dns on gke-autopilot)dnsAll flavorsfalse on kind; true on all other flavors (override with instances.<namespace>.platform-dns.optional)Represents the cluster’s built-in DNS Service and exposes its out.name and out.fqdn. On gke and gke-autopilot, it also sets dnsPeers to the DNS endpoints allowed by generated network policies (see DNS peers). When active, kix deploy waits until the Service has a ready endpoint before applying workloads that depend on DNS. Sets namespace on kix.mkImport when the Service lives outside the import instance’s namespace: on gke-autopilot, gke-managed/platform-dns points to kube-system/kube-dns, and on openshift, kube-system/platform-dns points to openshift-dns/dns-default.
kube-system/platform-storage (gke-managed/platform-storage on gke-autopilot)storageClassesaks, gke, gke-autopilot, k3s, kind, ovh, scalewayfalseRepresents the default StorageClass created by the provider. Always active so optional storageClasses dependencies on StatefulSets and PVCs resolve to it and cross-resource check 20 sees the class.
kube-system/platform-network-policy (gke-managed/platform-network-policy on gke-autopilot)network-policy-enforcergke, gke-autopilot, and eks (when cluster.flavor.eks.networkPolicy = "vpc-cni")falseGenerates standard Kubernetes NetworkPolicy objects tailored to how the cloud CNI matches ipBlock CIDR rules against pod, node, and Service IPs. Writes a PackageInstance import record without waiting for an in-cluster resource during kix deploy. See Standard NetworkPolicy.
kube-system/cloud-identity (gke-managed/cloud-identity on gke-autopilot)cloudIdentityeks, gke, gke-autopilot, aksfalseConfigures how Kix renders cloud identities and declares the cloud’s annotation domain. Emits a PackageInstance import record without waiting for an in-cluster resource during kix deploy.
kube-system/platform-ciliumcnirke2 (when cluster.flavor.rke2.cni includes "cilium")falseExposes out.helmChartConfig = { name = "rke2-cilium"; namespace = "kube-system"; } so a managed cilium instance writes a HelmChartConfig instead of deploying a second Cilium chart.
kube-system/platform-snapshot-controllersnapshotControllerrke2falseExposes out.crds handles (VolumeSnapshotClass, VolumeSnapshotContent, VolumeSnapshot) for RKE2’s bundled snapshot controller.

The eks, gke, gke-autopilot, and aks flavors configure how Kix renders a cloud identity:

FlavorMechanismAnnotation domainRendered metadata
eksIAM roles for service accounts (IRSA), or EKS Pod Identity when cluster.flavor.eks.cloudIdentity = "pod-identity"eks.amazonaws.comServiceAccount annotations eks.amazonaws.com/role-arn (IRSA only) and kix.run/cloud-identity; pod template annotation checksum/cloud-identity; workload annotation kix.run/cloud-identity-env.
gke, gke-autopilotWorkload Identity Federation for GKEiam.gke.ioServiceAccount annotations iam.gke.io/gcp-service-account (when serviceAccount is set) and kix.run/cloud-identity; pod template annotation checksum/cloud-identity.
aksMicrosoft Entra Workload IDazure.workload.identityServiceAccount annotations azure.workload.identity/client-id, azure.workload.identity/tenant-id (when set), and kix.run/cloud-identity; pod template label azure.workload.identity/use: "true" and annotation checksum/cloud-identity; workload annotation kix.run/cloud-identity-env.

Other flavors do not configure cloud identities by default. On a self-managed cluster running the AWS or Azure workload identity webhook, add kix.modules.experimental.irsa-webhook or kix.modules.experimental.azure-workload-identity-webhook to modules alongside the flavor (see Cloud identities).

The table below lists the exact DNS Service FQDNs and default StorageClass names exposed by each flavor’s platform-dns and platform-storage imports:

FlavorImport namespaceplatform-dns.out.name (Service)platform-dns.out.fqdnplatform-storage (out.storageClassName)
akskube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>"managed-csi"
ekskube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>none (storageClasses is "absent"; install the EBS CSI driver or declare a storage-classes instance)
gkekube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>"standard-rwo"
gke-autopilotgke-managedkube-dnskube-dns.kube-system.svc.<clusterDomain>"standard-rwo"
k3skube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>"local-path"
kindkube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>"standard"
kubeadmkube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>none (storageClasses is "absent")
openshiftkube-systemdns-defaultdns-default.openshift-dns.svc.<clusterDomain>none (storageClasses is "absent" by default)
ovhkube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>"csi-cinder-high-speed"
rke2kube-systemrke2-coredns-rke2-corednsrke2-coredns-rke2-coredns.kube-system.svc.<clusterDomain>none (storageClasses is "absent")
scalewaykube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>"sbs-default"
taloskube-systemkube-dnskube-dns.kube-system.svc.<clusterDomain>none (storageClasses is "absent")

When a flavor imports a default StorageClass (cluster.roles.storageClasses.binding = "shadowable"), kix.storage.mkClasses (used by packages.storage-classes) refuses to annotate a managed StorageClass with storageclass.kubernetes.io/is-default-class: "true" because the cluster’s existing default class is not removed by Kix and Kubernetes would see two defaults. (When multiple rendered StorageClass manifests in the same build are marked default, cross-resource validation check 23 also fails the build.)