-
Notifications
You must be signed in to change notification settings - Fork 25
Unable to run kind node in k8s pod on CoreOS #2646
Description
Issue Report
Bug
I am currently trying to run a kind node inside a Kubernetes Pod running on a CoreOS Node.
The Pod manifest looks like this:
apiVersion: v1
kind: Pod
metadata:
name: kind-worker-1
namespace: kind
labels:
app: kind-node
node: worker-1
spec:
containers:
- env:
- name: PATH
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: container
value: docker
image: kindest/node:v1.16.3
name: kind-node
resources:
limits:
cpu: "2"
memory: 8Gi
requests:
cpu: "2"
memory: 8Gi
securityContext:
privileged: true
stdin: true
volumeMounts:
- mountPath: /lib/modules
name: modules
readOnly: true
- mountPath: /sys/fs/cgroup
name: cgroup
- mountPath: /var/lib/docker
name: dind-storage
volumes:
- emptyDir: {}
name: dind-storage
- hostPath:
path: /lib/modules
type: Directory
name: modules
- hostPath:
path: /sys/fs/cgroup
type: Directory
name: cgroupI am able to bootstrap the node, join the cluster and so on...
But about every 50 seconds, the systemd services for kubelet and containerd inside the Pod are restarted after messages from the kubelet looking like this:
Dec 17 12:14:07 kind-worker-1 kubelet[2903]: I1217 12:14:07.676823 2903 pod_container_manager_linux.go:166] Attempt to kill process with pid: 1
Dec 17 12:14:07 kind-worker-1 kubelet[2903]: I1217 12:14:07.676850 2903 pod_container_manager_linux.go:166] Attempt to kill process with pid: 2896
Dec 17 12:14:07 kind-worker-1 kubelet[2903]: I1217 12:14:07.676861 2903 pod_container_manager_linux.go:166] Attempt to kill process with pid: 2903
Dec 17 12:14:08 kind-worker-1 systemd[1]: kubelet.service: Service RestartSec=1s expired, scheduling restart.
Dec 17 12:14:08 kind-worker-1 systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 70.
Dec 17 12:14:08 kind-worker-1 systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
Dec 17 12:14:08 kind-worker-1 systemd[1]: Started kubelet: The Kubernetes Node Agent.
Therefore the Node can't stay ready and can't run any Pods.
Container Linux Version
$ cat /etc/os-release
NAME="Container Linux by CoreOS"
ID=coreos
VERSION=2135.6.0
VERSION_ID=2135.6.0
BUILD_ID=2019-07-30-0722
PRETTY_NAME="Container Linux by CoreOS 2135.6.0 (Rhyolite)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://issues.coreos.com"
COREOS_BOARD="amd64-usr"
Environment
What hardware/cloud provider/hypervisor is being used to run Container Linux?
aws
Expected Behavior
systemd services should keep running inside a docker container.
Actual Behavior
systemd services are killed about every 50s.
Reproduction Steps
- run a Pod with a
kindest/nodeimage on a CoreOS Node - try to bootstrap a kind cluster
Other Information
I already read through the issues over at kind (mainly kubernetes-sigs/kind#303 and kubernetes-sigs/kind#890) and tried all the suggestions, but none of them seem to fix the problem on CoreOS.
/cc @BenTheElder
/cc @aojea