# Standard K8s Installation failed - Centos7

**URL:** https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676
**Category:** General Discussions
**Tags:** deployment
**Created:** [July 19, 2022, 2:37pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676 "2022-07-19T14:37:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Petr\_Kunstat](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/petr_kunstat/32/10463_2.png) [@Petr\_Kunstat](https://discuss.kubernetes.io/u/Petr_Kunstat)
#### Post date: [July 19, 2022, 2:37pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/1 "2022-07-19T14:37:26Z")

</div>

Can anybody help me out please.  
I started with the simple installation of the master node on Centos7 and I am facing issue to initiate kubernetes.  
Any recommendation ?  
thank you  
Petr

Error

[root@master-node ~]# sudo kubeadm init  
[init] Using Kubernetes version: v1.24.3  
[preflight] Running pre-flight checks  
error execution phase preflight: [preflight] Some fatal errors occurred:  
[ERROR FileAvailable–etc-kubernetes-manifests-kube-apiserver.yaml]: /etc/kubernetes/manifests/kube-apiserver.yaml already exists  
[ERROR FileAvailable–etc-kubernetes-manifests-kube-controller-manager.yaml]: /etc/kubernetes/manifests/kube-controller-manager.yaml already exists  
[ERROR FileAvailable–etc-kubernetes-manifests-kube-scheduler.yaml]: /etc/kubernetes/manifests/kube-scheduler.yaml already exists  
[ERROR FileAvailable–etc-kubernetes-manifests-etcd.yaml]: /etc/kubernetes/manifests/etcd.yaml already exists  
[ERROR CRI]: container runtime is not running: output: E0719 14:22:41.951572 12007 remote\_runtime.go:925] “Status from runtime service failed” err=“rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”  
time=“2022-07-19T14:22:41+01:00” level=fatal msg=“getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”  
, error: exit status 1  
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`  
To see the stack trace of this error execute with --v=5 or higher

[root@master-node ~]# kubectl config view  
apiVersion: v1  
clusters:

- cluster:  
certificate-authority-data: DATA+OMITTED  
server: [https://192.168.72.150:6443](https://192.168.72.150:6443)  
name: kubernetes  
contexts:
- context:  
cluster: kubernetes  
user: kubernetes-admin  
name: kubernetes-admin@kubernetes  
current-context: kubernetes-admin@kubernetes  
kind: Config  
preferences: {}  
users:
- name: kubernetes-admin  
user:  
client-certificate-data: REDACTED  
client-key-data: REDACTED  
[root@master-node ~]#

### Cluster information:

Kubernetes version: v1.24.3  
Cloud being used: (put bare-metal if not on a public cloud)  
Installation method: native centos  
Host OS: Centos 7 CentOS Linux release 7.4.1708 (Core)  
CNI and version:  
CRI and version:

---

<div class="post-metadata">

### Author: ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)
#### Post date: [July 19, 2022, 3:34pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/2 "2022-07-19T15:34:39Z")

</div>

> [@Petr\_Kunstat](#):
>
> [ERROR CRI]: container runtime is not running: output: E0719 14:22:41.951572 12007 remote\_runtime.go:925] “Status from runtime service failed” err=“rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”

> [@Petr\_Kunstat](#):
>
> CNI and version:  
> CRI and version:

It doesn’t look like you have a Container Runtime installed or it hasn’t been configured to work with Kubernetes.

> **[Installing kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime)**
>
> This page shows how to install the kubeadm toolbox. For information on how to create a cluster with kubeadm once you have performed this installation process, see the Creating a cluster with kubeadm page.
> This installation guide is for Kubernetes...

---

<div class="post-metadata">

### Author: ![Petr\_Kunstat](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/petr_kunstat/32/10463_2.png) [@Petr\_Kunstat](https://discuss.kubernetes.io/u/Petr_Kunstat)
#### Post date: [July 20, 2022, 1:16pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/3 "2022-07-20T13:16:10Z")

</div>

> [@Petr\_Kunstat](#):
>
> sudo kubeadm init

I have followed all steps in this guide below

> **[How to Install Kubernetes on CentOS 7 (Step by Step)](https://phoenixnap.com/kb/how-to-install-kubernetes-on-centos)**
>
> This tutorial shows you how to install and deploy Kubernetes on CentOS 7. Use Kubernetes to automate app deployment and scale operations with ease.

> **[How to Install Kubernetes Cluster on CentOS 7 - HOSTAFRICA](https://hostafrica.co.za/blog/new-technologies/install-kubernetes-delpoy-cluster-centos-7/)**
>
> Learn how to install Kubernetes and deploy a cluster with Docker on CentOS 7. Step by step instructions with commands and images.

then I diasbled all FW and the problem persist to connect to localhost:8080

[root@master-node ~]# kubectl get nodes -o wide  
The connection to the server localhost:8080 was refused - did you specify the right host or port?  
[root@master-node ~]#

---

<div class="post-metadata">

### Author: ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)
#### Post date: [July 20, 2022, 1:32pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/4 "2022-07-20T13:32:36Z")

</div>

Those guides are terribly out of date. Only the upstream ones on [kubernetes.io](http://kubernetes.io) are kept up to date with every release.

The problem is still what I said it was in the earlier reply, you need a container runtime.

---

<div class="post-metadata">

### Author: ![Petr\_Kunstat](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/petr_kunstat/32/10463_2.png) [@Petr\_Kunstat](https://discuss.kubernetes.io/u/Petr_Kunstat)
#### Post date: [July 21, 2022, 8:32am UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/5 "2022-07-21T08:32:11Z")

</div>

> [@mrbobbytables](#):
>
> a container runtime

Thank you for the help. To me it is not clear how to achieve to be CR runtime on the main node running.  
I did all steps from th guide [Install and Set Up kubectl on Linux | Kubernetes](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management) but still I am facing this error

[root@master-node ~]# kubectl version --short  
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.  
Client Version: v1.24.3  
Kustomize Version: v4.5.4  
The connection to the server localhost:8080 was refused - did you specify the right host or port?  
[root@master-node ~]#

---

<div class="post-metadata">

### Author: ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)
#### Post date: [July 21, 2022, 12:55pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/6 "2022-07-21T12:55:49Z")

</div>

kubectl is the cli client tool you use to access kubernetes, not part of the server install itself. IMO I would start with the intro docs on [kubernetes.io](http://kubernetes.io) to learn a bit about how the concepts and how the different components integrate with each other before moving forward with an install. There are multiple dependencies and configurations that are not directly handed by k8s itself and it won’t install or function without them.

---

<div class="post-metadata">

### Author: ![tej-singh-rana](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/tej-singh-rana/32/5921_2.png) [@tej-singh-rana](https://discuss.kubernetes.io/u/tej-singh-rana)
#### Post date: [July 22, 2022, 9:30pm UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/7 "2022-07-22T21:30:17Z")

</div>

In the links below, you will see the definition of CRI and available options to install.

> **[Container Runtime Interface (CRI)](https://kubernetes.io/docs/concepts/architecture/cri/)**
>
> The CRI is a plugin interface which enables the kubelet to use a wide variety of container runtimes, without having a need to recompile the cluster components.
> You need a working container runtime on each Node in your cluster, so that the kubelet can...

> **[Container Runtimes](https://kubernetes.io/docs/setup/production-environment/container-runtimes/)**
>
> Note: Dockershim has been removed from the Kubernetes project as of release 1.24. Read the Dockershim Removal FAQ for further details. You need to install a container runtime into each node in the cluster so that Pods can run there. This page...

---

<div class="post-metadata">

### Author: ![Petr\_Kunstat](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/petr_kunstat/32/10463_2.png) [@Petr\_Kunstat](https://discuss.kubernetes.io/u/Petr_Kunstat)
#### Post date: [July 26, 2022, 7:55am UTC](https://discuss.kubernetes.io/t/standard-k8s-installation-failed-centos7/20676/8 "2022-07-26T07:55:42Z")

</div>

I really appreciate your help. I read all articles and still I was not able to make kubeadm running.  
kubeadm init always fails

[init] Using Kubernetes version: v1.24.3  
[preflight] Running pre-flight checks  
error execution phase preflight: [preflight] Some fatal errors occurred:  
[ERROR CRI]: container runtime is not running: output: E0726 08:03:37.552679 30902 remote\_runtime.go:925] “Status from runtime service failed” err=“rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”  
time=“2022-07-26T08:03:37+01:00” level=fatal msg=“getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService”  
, error: exit status 1  
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`  
To see the stack trace of this error execute with --v=5 or higher

So I found the solution

**1) deploy [GitHub - Mirantis/cri-dockerd](https://github.com/Mirantis/cri-dockerd)**  
**2) remove prevous created yaml files**  
3) Navigate kubeadm to a cri

kubeadm init --apiserver-advertise-address=192.168.72.150 --pod-network-cidr 192.168.0.0/16 --cri-socket=unix:///var/run/cri-dockerd.sock
