# Set up Kubernetes with Qualcomm Linux

[Kubernetes](https://kubernetes.io/) is an open-source platform that automates the deployment, scaling, and management of applications running in a container. Kubernetes helps
to organize containers across multiple devices, ensuring efficient resource utilization, high availability, and scalability of applications.
Kubernetes is useful not only for large-scale servers and cloud systems but also for small-scale Linux-embedded devices.
It helps manage and orchestrate containers and applications across IoT devices efficiently.

## Enable Kubernetes

- The Qualcomm Linux release enables Kubernetes by default in
`qcom-multimedia-image`, through the following changes:

    - The `packagegroup-qcom-k8s` is defined in the `meta-qcom-hwe` layer at `dynamic-layers/virtualization-layer/recipes-containers/packagegroups/packagegroup-qcom-k8s.bb`.
    - The `packagegroup-qcom-k8s` is included in the `recipes-products/packagegroups/packagegroup-qcom-multimedia.bb` image recipe in the `meta-qcom-distro` layer.
- To verify the status of kubelet after bootup, run the following command and verify the output:

    | Command | Description | Output |
    | --- | --- | --- |
    | `systemctl status kubelet` | If the device has been set up at least once as a Kubernetes node using `kubeadm` after bootup | `Active` (running) |
    | `systemctl status kubelet` | If the device has not been set up as a Kubernetes node using `kubeadm` after bootup | `Inactive` (stopped) |
    |  |  |  |

## Changes made in Docker and Kubernetes in contrast to the `meta-virtualization` solution

- The `meta-qcom-hwe/dynamic-layers/virtualization-layer/recipes-containers/docker/docker-moby_git.bbappend` file
modifies `/${systemd_unitdir}/system/docker.service` to add option
`--exec-opt native.cgroupdriver=systemd` to the `dockerd`
command that runs as part of `ExecStart` of the service. This maintains parity with
the `cgroupdriver` between Docker and Kubernetes.
- The `meta-qcom-hwe`/`recipes-containers`/`kubernetes`/`kubernetes_git.bbappend` file
modifies `/lib/systemd/system/kubelet.service.d/10-kubeadm.conf`
to add `--fail-swap-on=false` as part of `KUBELET_EXTRA_ARGS`.
By default, Kubernetes expects swap to be `OFF`, but Qualcomm Linux has swap set to `ON` with the zram feature enabled.
Setting `--fail-swap-on=false` allows the kubelet to run even if swap memory is enabled.
- The upstream `kubelet.service` attempts to start automatically upon
device bootup, even if the device isn’t configured as a Kubernetes
node. However, this behavior consumes resources and impacts power.
To address this, modify `kubelet.service` by
removing `WantedBy=multi-user.target` in the
`meta-qcom-hwe/recipes-containers/kubernetes/kubernetes_git.bbappend`
file. With `WantedBy=multi-user.target` deleted, the upstream `kubelet.service`
starts when the device is set up as a Kubernetes node
using `kubeadm`, rather than automatically at bootup as part of `multi-user.target`.

Last Published: Dec 21, 2025

[Previous Topic
Run Docker containers](https://docs.qualcomm.com/bundle/publicresource/80-70023-27/topics/run_docker_containers.md) [Next Topic
Configure](https://docs.qualcomm.com/bundle/publicresource/80-70023-27/topics/configure_properties.md)

Source: [https://docs.qualcomm.com/doc/80-70023-27/topic/setup_kubernetes_with_qualcomm_linux.html](https://docs.qualcomm.com/doc/80-70023-27/topic/setup_kubernetes_with_qualcomm_linux.html)