How to run successfully Kubernetes on Mesosphere DC/OS with one agent?

7/25/2018

I am trying to install Kubernetes on Mesosphere DC/OS with only one private agent, using dcos-vagrant.

However, the step for "kube-node-0", get stuck on "PREPARED" :

# dcos kubernetes plan show deploy

deploy (serial strategy) (IN_PROGRESS)
├─ etcd (serial strategy) (COMPLETE)
│  └─ etcd-0:[peer] (COMPLETE)
├─ apiserver (dependency strategy) (COMPLETE)
│  └─ kube-apiserver-0:[instance] (COMPLETE)
├─ mandatory-addons (serial strategy) (COMPLETE)
│  ├─ mandatory-addons-0:[additional-cluster-role-bindings] (COMPLETE)
│  ├─ mandatory-addons-0:[kubelet-tls-bootstrapping] (COMPLETE)
│  ├─ mandatory-addons-0:[kube-dns] (COMPLETE)
│  ├─ mandatory-addons-0:[metrics-server] (COMPLETE)
│  ├─ mandatory-addons-0:[dashboard] (COMPLETE)
│  └─ mandatory-addons-0:[ark] (COMPLETE)
├─ kubernetes-api-proxy (dependency strategy) (COMPLETE)
│  └─ kubernetes-api-proxy-0:[install] (COMPLETE)
├─ controller-manager (dependency strategy) (COMPLETE)
│  └─ kube-controller-manager-0:[instance] (COMPLETE)
├─ scheduler (dependency strategy) (COMPLETE)
│  └─ kube-scheduler-0:[instance] (COMPLETE)
├─ node (dependency strategy) (IN_PROGRESS)
│  └─ kube-node-0:[kube-proxy, coredns, kubelet] (PREPARED)
└─ public-node (dependency strategy) (COMPLETE)

I don't understand the problem because there are enough resources left, as we can see on the DC/OS Dashboard : enter image description here

Here is Kubernete's configuration in options.js :

{
  "kubernetes": {
     "node_count": 1,
     "reserved_resources": {
     "kube_cpus": 10,
     "kube_mem": 10000,
     "kube_disk": 15000
    }
  }
}

And below, VagrantConfig.yaml :

m1:
  ip: 192.168.65.90
  cpus: 2
  memory: 2048
  type: master
a1:
  ip: 192.168.65.111
  cpus: 14
  memory: 13144
  memory-reserved: 512
  type: agent-private
p1:
  ip: 192.168.65.60
  cpus: 2
  memory: 1536
  memory-reserved: 512
  type: agent-public
  aliases:
  - spring.acme.org
  - oinker.acme.org
boot:
  ip: 192.168.65.50
  cpus: 2
  memory: 1024
  type: boot
-- nise2
cluster-computing
dcos
kubernetes
mesos
vagrant

1 Answer

7/31/2018

The problem seems to be how much RAM you're requesting for the Kubernetes node. Apparently, the cluster has less than 10000MB of available RAM (as per screenshot, there's 4GiB used out of 10GiB). As a test, reduce that to 8000 and it should work.

-- Paulo Pires
Source: StackOverflow