Score:1

cannot run kubeadm init on centos

jp flag

I am trying to run kubeadm init on my centos 8 server and I am getting this error

I0609 09:51:54.527931 2575529 version.go:255] remote version is much newer: v1.27.2; falling back to: stable-1.23
[init] Using Kubernetes version: v1.23.17
[preflight] Running pre-flight checks
    [WARNING FileExisting-tc]: tc not found in system path
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR FileExisting-conntrack]: conntrack not found in system path
    [ERROR DirAvailable--var-lib-etcd]: /var/lib/etcd is not empty
[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 as the error says, tc and conntrack are missing, i tried to install it and got the below error.

Centos_8.x_x86_64                                                                                 0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'Centos-8.x':
  - Curl error (37): Couldn't read a file:// file for file:///root/os/repodata/repomd.xml [Couldn't open file /root/os/repodata/repomd.xml]
Error: Failed to download metadata for repo 'Centos-8.x': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Veera Nagireddy avatar
nl flag
This is probably down to the fact that [CentOS Linux 8 has reached EOL](https://www.centos.org/centos-linux-eol/). Article explains that if you want to keep with CentoOS8 you'll need to change the repos to use **vault.centos.org** BUT there will be no further updates. Refer to similar [Community issue](https://www.linode.com/community/questions/22398/error-failed-to-download-metadata-for-repo-baseos-appstream-centos-8), which may help to resolve your issue.
Veera Nagireddy avatar
nl flag
Hi, Have you tried the above comment and the issue is resolved?
anonymous avatar
jp flag
this is the error now ``` Errors during downloading metadata for repository 'extras': - Status code: 404 for https://vault.centos.org/centos/8-stream/extras/x86_64/os/repodata/repomd.xml (IP: 18.161.216.69) Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried ```
anonymous avatar
jp flag
i had to change a couple of my repo files to point to the right ones, but this worked, thank you for the help
Veera Nagireddy avatar
nl flag
Glad to hear that your issue is resolved now and I have captured the suggestions as a response for greater visibility for community members,if any changes required you can edit the answer.
Score:0
nl flag

This is probably not working due to the fact that CentOS Linux 8 has reached EOL. As per the official article, the contents of the official repository of CentOS Linux 8 were removed from http://mirror.centos.org/ to http://vault.centos.org/, where it will be archived permanently since Centos Linux 8 will not be able to provide updates to the content after the EOL date.

Workaround 1: Refer to Aaron Kili’s article on Tecmint

To fix the error, open your terminal or login via ssh, and run the following commands to change the repo URL to point to vault.centos.org, from the official CentOS repos.

Here you can use the sed command to edit the required directives or parameters in the repo configuration files:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Workaround 2 : Refer to Techglimpse content written by Ramya Santhosh. Follow the below steps to resolve your issue:

Step 1: Go to the /etc/yum.repos.d/ directory.

[root@autocontroller ~]# cd /etc/yum.repos.d/

Step 2: Run the below commands

[root@autocontroller ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@autocontroller ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Step 3: Now run the yum update

[root@autocontroller ~]# yum update -y
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.