Search code examples
dockerjenkinskubernetesmicrok8s

Deploy Jenkins on micro8s cluster on raspberry pi


I have a local setup of three raspberry pi's and followed the tutorial on here. I managed to get my microk8s cluster running. Next I wanted to deploy Jenkins.

Whenever I execute the first command:

kubectl create -f jenkins-deployment.yaml -n jenkins

I get the following error:

standard_init_linux.go:219: exec user process caused: exec format error

Some other searches suggest installing docker. However in the tutorial there is nothing about installing docker. Any ideas what is happening here?


Solution

  • Docker vs. containerd

    Regarding your suggestion about the docker. From Version 1.14.0 of MicroK8s (released 25 March 2019) containerd replaced dockerd. Starting from version 1.14.0 containerd automatically ships with MicroK8S installation So, you don't need dockerd as CRI. Below you can find modules MicroK8S set up during installation: The following systemd services will be running in your system:

    • snap.microk8s.daemon-apiserver, is the kube-apiserver daemon started using the arguments in ${SNAP_DATA}/args/kube-apiserver
    • snap.microk8s.daemon-controller-manager, is the kube-controller-manager daemon started using the arguments in ${SNAP_DATA}/args/kube-controller-manager
    • snap.microk8s.daemon-scheduler, is the kube-scheduler daemon started using the arguments in ${SNAP_DATA}/args/kube-scheduler
    • snap.microk8s.daemon-kubelet, is the kubelet daemon started using the arguments in ${SNAP_DATA}/args/kubelet
    • snap.microk8s.daemon-proxy, is the kube-proxy daemon started using the arguments in ${SNAP_DATA}/args/kube-proxy
    • snap.microk8s.daemon-containerd, is the containerd daemon started using the configuration in ${SNAP_DATA}/args/containerd and ${SNAP_DATA}/args/containerd-template.toml.
    • snap.microk8s.daemon-etcd, is the etcd daemon started using the arguments in ${SNAP_DATA}/args/etcd

    ARM architecture

    Next, Raspberry Pi and, as mentioned previously by community, ARM. You can not use regular amd64-based images for ARM architecture.

    Possible solutions

    To solve a problem, I recommend you 2 options below.

    1. Use already prepared ARM-based image of Jenkins for ARM architecture. Also you can search images for Raspberry Pi with filters. Just select which architecture you would like to use: ARM, ARM64, etc.

    Some images have been ported for other architectures, and many of these are officially supported (to various degrees).

    ARMv6 32-bit (arm32v6): https://hub.docker.com/u/arm32v6/

    ARMv7 32-bit (arm32v7): https://hub.docker.com/u/arm32v7/

    ARMv8 64-bit (arm64v8): https://hub.docker.com/u/arm64v8/

    1. Prepare your own image for ARM using buildx

    References: