I'm currently using a podtemplate (See below) inside my Jenkinsfile
to provision a docker container which mounts to the docker socket to provision containers within the pipeline.
As the cloud-hosted kubernetes I use is going from dockerd to containerd as container runtime, I want to ask if there is somebody who is using containerd with jenkins kubernetes plugin (especially podtemplates).
podTemplate(label: 'mypod', cloud: cloud, serviceAccount: serviceAccount, kubenamespace: kubenamespace, envVars: [
envVar(key: 'NAMESPACE', value: kubenamespace),
envVar(key: 'REGNAMESPACE', value: regnamespace),
envVar(key: 'APPNAME', value: appname),
envVar(key: 'REGISTRY', value: registry)
],
volumes: [
hostPathVolume(hostPath: '/etc/docker/certs.d', mountPath: '/etc/docker/certs.d'),
hostPathVolume(hostPath: '/var/run/docker.sock', mountPath: '/var/run/docker.sock')
],
containers: [
containerTemplate(name: 'helm', image: 'lachlanevenson/k8s-helm:v2.9.1', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'docker' , image: 'docker:17.06.1-ce', ttyEnabled: true, command: 'cat')]) {
The Containerd socket within IKS 1.11 (unix:////var/run/containerd/containerd.sock) does not support mounting it and executing docker commands, thus running docker builds in IKS or any other Kubernetes Containerd setup is not supported.
We will use Google Container Tools for docker operations inside the cluster.
The folder structure is slightly different between the Docker engine and containerd. Specifically the containerd runtime has the following directories...
logs - /var/log/pods/ websocket - unix:////var/run/containerd/containerd.sock
This link has more details. https://github.com/containerd/containerd/blob/master/docs/ops.md