# K8s environment cannot be initiated

**URL:** <https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276>\
**Category:** General\
**Created:** [April 30, 2017, 7:54am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276 "2017-04-30T07:54:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![funkydorian](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@funkydorian](https://forums.suse.com/u/funkydorian)\
**Post date:** [April 30, 2017, 7:54am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/1 "2017-04-30T07:54:51Z")

</div>

I want to initiate a k8s cluster.

Steps:  
Opened UDP500/4500 ingress/egress

1. Rancher Server installation:  
docker run -d -p 8080:8080 rancher/server:stable

2. Installed k8s supported docker on host:  
curl [https://releases.rancher.com/install-docker/1.12.sh](https://releases.rancher.com/install-docker/1.12.sh) | sh

3. Adding node:  
sudo docker run -e CATTLE\_AGENT\_IP=“10.132.0.3” --rm --privileged -v /var/run/docker  
.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.2 [http://rancher.kloia.com:8080/](http://rancher.kloia.com:8080/)  
v1/scripts/xxxxxxx:xxxxxxxxx:xxxxxxxxxxxxx

On Rancher Dashboard seems initiated but practically no:

> kubectl get nodes  
> NAME STATUS AGE  
> rancher-wpress-k8s-01.c.big-rig-163913.internal NotReady 14m

What can i be missing?

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [May 3, 2017, 12:58am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/2 "2017-05-03T00:58:24Z")

</div>

Let’s see if we can figure out what’s going on in your environment. Could you supply the following?

- What OS are you running?
- Where are you running (Bare-metal/VM/on-prem/cloud)
- What’s the status of the host (Infrastructure -\> Hosts)
- What’s the status of the Infrastructure Stacks? (Kubernetes -\> Infrastructure Stacks)
- Can you supply the output of `kubectl get events`?

---

<div class="post-metadata">

**Author:** ![funkydorian](https://avatars.discourse-cdn.com/v4/letter/f/46a35a/32.png) [@funkydorian](https://forums.suse.com/u/funkydorian)\
**Post date:** [May 3, 2017, 9:27am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/3 "2017-05-03T09:27:14Z")

</div>

Thanks for the reply, here are the answers:

Debian  
Google Cloud Instances  
Host is active and all green  
Infrastructure stacks all green  
Output of kubectl get events: Can’t find mounted memory cgroups

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [May 3, 2017, 5:59pm UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/4 "2017-05-03T17:59:43Z")

</div>

Ok, I guess this is Debian 8 (Jessie) and the stock kernel we’re talking about?

This kernel does not have memory cgroups enabled by default, which fails the initalization of Kubernetes. If you want to stay on Debian and the stock kernel, you can edit `/etc/default/grub` so that the line `GRUB_CMDLINE_LINUX` contains  
`cgroup_enable=memory` i.e. `GRUB_CMDLINE_LINUX="blablabla cgroup_enable=memory"`. After this, run `sudo update-grub2` and `reboot`. Your setup should be coming online.

Otherwise you could pick a OS with those Linux kernel defaults (and a more recent kernel) like RancherOS or Ubuntu.

---

<div class="post-metadata">

**Author:** ![siggi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/siggi/32/5668_2.png) [@siggi](https://forums.suse.com/u/siggi)\
**Post date:** [May 4, 2017, 1:24pm UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/5 "2017-05-04T13:24:54Z")

</div>

I get an error when I try to launch kubernetes hosts with RancherOS 1.0.1

```auto
(Expected state running but got error: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"mountpoint for cgroup not found\"") 

```

This is a fresh installation of a Rancher HA cluster.

Here’s a screenshot:

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/b/be189bdc717dc2c82c6219d0e1effe4286f19047.png)

---

<div class="post-metadata">

**Author:** ![siggi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/siggi/32/5668_2.png) [@siggi](https://forums.suse.com/u/siggi)\
**Post date:** [May 4, 2017, 2:52pm UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/6 "2017-05-04T14:52:52Z")

</div>

I can’t SSH into the container either since I get the following error:

`PTY allocation request failed on channel 0`

To fix this, I deleted all the hosts and used Ubuntu 16.04 … it seems that if you want Kubernetes, use Ubuntu.

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [May 8, 2017, 10:53am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/7 "2017-05-08T10:53:28Z")

</div>

The problem here is that RancherOS v1.0.1 runs Docker 17.03.1-ce by default, and this version is not supported by Kubernetes. If you want to run Kubernetes on RancherOS please run `sudo ros engine switch docker-1.12.6` to switch to a supported version of Docker.

---

<div class="post-metadata">

**Author:** ![firelyu](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@firelyu](https://forums.suse.com/u/firelyu)\
**Post date:** [July 23, 2017, 2:47am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/9 "2017-07-23T02:47:22Z")

</div>

This means I should change the docker version of the new added host?

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [July 23, 2017, 6:17am UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/10 "2017-07-23T06:17:47Z")

</div>

Yep, you can use `sudo ros engine switch docker-1.12.6` on the cmdline or use cloudconfig

```auto
#cloud-config
rancher:
  docker:
    engine: docker-1.12.6

```

[http://rancher.com/docs/os/configuration/switching-docker-versions/](http://rancher.com/docs/os/configuration/switching-docker-versions/)

---

<div class="post-metadata">

**Author:** ![aidanoldershaw](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aidanoldershaw](https://forums.suse.com/u/aidanoldershaw)\
**Post date:** [August 10, 2017, 3:41pm UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/11 "2017-08-10T15:41:14Z")

</div>

I’m getting the same error as siggi after adding an Oracle Linux host to a K8 environment. The docker version of the host was 17.05.0-ce, which I now realize is not supported. However, after that, I couldn’t run any docker containers, in or out of rancher, e.g.

`docker run hello-world` failed with:

`docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"mountpoint for devices not found\""`.

I tried reinstalling docker, but now the docker daemon won’t startup (fails with the cgroup mount). Any ideas how to resolve this?

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [August 10, 2017, 6:14pm UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/12 "2017-08-10T18:14:23Z")

</div>

What version of Oracle Linux? `cat /etc/os-release` + `uname -r` would be nice to know. Sounds similar to [https://github.com/moby/moby/issues/14353](https://github.com/moby/moby/issues/14353), but that’s a pretty old issue.

---

<div class="post-metadata">

**Author:** ![aidanoldershaw](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@aidanoldershaw](https://forums.suse.com/u/aidanoldershaw)\
**Post date:** [August 10, 2017, 6:36pm UTC](https://forums.suse.com/t/k8s-environment-cannot-be-initiated/6276/13 "2017-08-10T18:36:56Z")

</div>

`cat /etc/os-release`:

```auto
NAME="Oracle Linux Server"
VERSION="7.1"
ID="ol"
VERSION_ID="7.1"
PRETTY_NAME="Oracle Linux Server 7.1"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:1"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.1
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.1

```

`uname -r`:

```auto
3.10.0-514.26.2.el7.x86_64

```
