0

I'm creating kubernetes cluster on fedora 26, but I can't initialize cluster on kubernetes.

Here I'm attaching images and error for your references, guide me how to solve the issue..

Environment:

  • Docker Version
  • Client Version: 1.13.1
  • API version: 1.26

Kubeadm version:

Kubeadm version

Error Image:

Error Image

Cluster Error:

Cluster Error

atline
  • 28,355
  • 16
  • 77
  • 113
ajithk
  • 13
  • 2

2 Answers2

4

The issue with your setup is that the minimum required CPU to install Kubernetes with kubeadm is 2 and you have only 1 CPU on your VM.

If you want to setup kubernetes on single machine, please have a look at microK8s. Following is the step by step instruction to install it on Fedora:

https://itnext.io/a-local-kubernetes-with-microk8s-33ee31d1eed9

Prafull Ladha
  • 12,341
  • 2
  • 37
  • 58
  • you can also use minikube, but other than that - error points that this is the problem. – aurelius Dec 19 '18 at 15:09
  • The problem with minikube is it generates another VM on top of it, which also by default requires 2 CPU. You can configure it and increase the number of CPU but not sure if you can decrease it to 1. – Prafull Ladha Dec 19 '18 at 15:44
  • from what I know minikube actually uses 1 CPU and 1 GB of RAM which can be increased. – aurelius Dec 19 '18 at 15:46
  • 1
    I just checked with latest version of minikube using `minikube start -h` . This is what I found --cpus int Number of CPUs allocated to the minikube VM (default 2) – Prafull Ladha Dec 19 '18 at 15:49
  • 1
    You are right, I also found confirmation [here](https://github.com/kubernetes/minikube/blob/232080ae0cbcf9cb9a388eb76cc11cf6884e19c0/pkg/minikube/constants/constants.go#L102) . Thanks for that :) – aurelius Dec 19 '18 at 15:52
1

You can run kubeadm init with only one CPU added: --ignore-preflight-errors=NumCPU. So your new code:

kubeadm init --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=NumCPU

dose
  • 43
  • 1
  • 3