LAB 3.1 Installation
hi friends,
As I'm following the instructions in the book, when i reached to sep 14 with this command
kubeadm init --config=kubeadm-config.yaml --upload-certs | tee kubeadm-init.out # Save output for future review
i got this for output >>>
invalid configuration for GroupVersionKind /, Kind=: kind and apiVersion is mandatory information that must be specified
To see the stack trace of this error execute with --v=5 or higher
how can i solve this ??? what is wrong in my lab ???
Best Answers
-
Hello,
Please look at the contents of your kubeadm-config.yaml file. Does it match what is in the book? Did you copy over the example file provided in the course tarball? Also make sure the path matches the file location when using --config.
Regards,
0 -
Hi @shasha,
These errors are typically produced when
kubeadm init
is run several times consecutively.I would recommend a
kubeadm reset
before running anotherkubeadm init
.Regards,
-Chris0 -
Hi @saumya043,
In addition to the details provided by the Overview section of lab 3.1, there are demo video guides that show you how to provision your VMs for the lab environment. These video guides are focusing on Google Cloud and Amazon Web Services, but in combination with VM specs detailed in the Overview, you may be able to provision VMs locally as well, through a hypervisor such as VirtualBox. However, Google Compute Engine (GCE) VMs are recommended because they require the least amount of configuration for the lab exercises to work as presented in the lab guide.
You can view and/or download these video guides from the resources URL provided in the Overview section of lab 3.1, with the required user ID and passwords found below the URL in the lab manual.
Depending on your host workstation's Operating System, the terminal or SSH client application you are planning to use, the video guides may relate in their entirety to your environment, or you may need to use additional tools to help you accomplish the setup of your lab environment.
The videos are aimed at users running Windows Operating System with Putty SSH client. One of the videos shows users how to create a PPK key file with Puty KeyGen, how to provision Google Compute Engine (GCE) VMs on the Google Cloud Platform (GCP), how to configure the VMs with the key file, and how to connect to these running VMs with the Putty SSH client. Another video shows how to provision Elastic Compute Cloud (EC2) VMs on the Amazon Web Services (AWS) platform, how to retrieve an auto generated PEM key file, then how to convert the key file with Putty KeyGen to PPK format required by the Putty SSH client, and then finally connect to the VMs with Putty.
Similar provisioning steps are required for other host Operating Systems, SSH clients, cloud environments and/or local hypervisors.
Regards,
-Chris0
Answers
-
tnx for reply serewicz,
yes the contents of kubeadm-config.yaml file are match whit bookpiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: 1.19.1 #<-- Use the word stable for newest version
controlPlaneEndpoint: "k8smaster:6443" #<-- Use the node alias not the IP
networking:
podSubnet: 192.168.0.0/16 #<-- Match the IP range from the Calico config file>
OH my GOD... the A from API is missed
0 -
Just After pass this i face with this error .
>
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Port-6443]: Port 6443 is in use
[ERROR Port-10259]: Port 10259 is in use
[ERROR Port-10257]: Port 10257 is in use
[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 Port-10250]: Port 10250 is in use
[ERROR Port-2379]: Port 2379 is in use
[ERROR Port-2380]: Port 2380 is in use
[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>
i think when i try to solve my old problem i do something wrong.
does it any way to return to structure or must start from first step ?0 -
hi
I am not able to understand step 1 of this lab ....can anyone please explain it to me...as when i am running the command with my username and ip address(ethernet) it showing "LFS458.pem" identity file not found....0 -
should i create a ssh-key and another localhost alias....i am too confused
0 -
-
@saumya043 this step depend on your lab could be different.
if you use VM and install OS yourself you can used your username and password insist of .pem file.
and if you make your environment on cloud. you must use their .pem file --( the LFS458.pem just an example in this document )0 -
Hello I am trying to run a below command:
kubeadm init --config=kubeadm-config.yaml --upload-certs | tee kubeadm-init.outBut I am getting an error:
invalid configuration for GroupVersionKind /, Kind=: kind and apiVersion is mandatory information that must be specified
To see the stack trace of this error execute with --v=5 or higherIf I check the contents of kubeadm-config.yaml file and compare with what is in the provided book they are same.
Any help on how I can fix this?
Thank you,
Gaurav0 -
Hi @gaurav4978,
Keep in mind that the content of this file is case sensitive.
Kind:
should be lower-casedkind:
Using the config files and scripts provided in the SOLUTIONS tarball would help to prevent such typos in the future.
Regards,
-Chris0 -
Hey @chrispokorni ,
Thanks for your response. Nice pick though, but still seeing same issue do I need to reset kubeadm too?Where do we find this "Using the config files and scripts provided in the SOLUTIONS tarball would help to prevent such typos in the future."
Thanks!
0 -
Hi @gaurav4978,
You are correct, a
kubeadm reset
needs to be executed before another attempt atkubeadm init
You can revisit the "Course Resources" page of Chapter 1, or Lab Exercise 3.1 to find instructions on how to access the SOLUTIONS tarball.
Regards,
-Chris0 -
Hi @chrispokorni ,
Thanks again for your prompt response.
The above second screenshot was from the Lab Exercise 3.1 from where I copied and created that config file. However, still seeing the same error even after _reset _command.
Thanks!
0 -
Hi @gaurav4978,
Copy/paste directly from the PDF is not the most reliable method to build configuration files, that is why the SOLUTIONS tarball is made available, that includes files needed for most lab exercises.
Regards,
-Chris0 -
I am running into similar issues when running the below command...
kubeadm init --config kubeadm-config.yaml --upload-certs | tee kubeadm-init.out # Save output for future review
Everything seems to run just fine until this...
Ran the kubeadm reset command and then tried again with same error. My config file is just like the one in the tarbal. Only difference is I used the word stable instead of version number just like below.
kubernetesVersion: stable #<-- Use the word stable for newest version
Any advise would be great as I am hung until I get past this.
Cheers,
Ray0 -
Hi @rtodich,
I'd recommend using the kubernetes version from the lab guide, as it will allow you to also complete the cluster update exercise from chapter 4.
The connection refused errors may be related to a networking configuration of your infrastructure. Are you using cloud or local hypervisor for the VMs? Is there a firewall running on your instance that may block traffic to any ports? Is the hosts file configured with the correct IP address and alias?
Regards,
-Chris0 -
Hey Chris,
I changed the Kubernetes version to 1.20.1, which is what the book has. I am using AWS as my infrastructure. Host file is correct as I double-checked. Decided to create a new node and retry from scratch. Looks like the network errors are coming from the local host. The security group in AWS associated with the nodes are wide open within the ip ranges 172.31.0.0/16. Might the linux box itself have a firewall that is the issue?
0 -
I can say that during the new configuration and the others, this is something that I have never been prompted for. Would this make a difference regarding the sshd-config file?
0 -
HI @rtodich,
The services restart and the sshd prompts are dated, and have not been seen lately.
Your issue is related to your networking. Did you have a chance to watch the video demo on how to set up your infrastructure with AWS?
Are you using the default AWS VPC? If so, try creating a new VPC, with a single SG to allow all protocols ingress traffic from all source to all ports.
On your EC2 instance you can check whether the OS level firewall is active with
sudo ufw status
Regards,
-Chris0 -
@chrispokorni said:
Hi @rtodich,I'd recommend using the kubernetes version from the lab guide, as it will allow you to also complete the cluster update exercise from chapter 4.
The connection refused errors may be related to a networking configuration of your infrastructure. Are you using cloud or local hypervisor for the VMs? Is there a firewall running on your instance that may block traffic to any ports? Is the hosts file configured with the correct IP address and alias?
Regards,
-ChrisI have redone everything and am back at the section for initializing the cp. Below is the command I will be running.
kubeadm init --config kubeadm-config.yaml --upload-certs | tee kubeadm-init.out # Save output for future review
I have remove the / and the = between config=kubeadm-config.yaml as I have read this can be done. Would this be correct or should the = be in there?
0 -
Hi @rtodich,
I could not find such a recommendation in the lab guide to run the command without the "=" sign. Also, if you have a chance to explore the official documentation, you may find examples using the "=" sign.
Regards,
-Chris0 -
Hello,
Please see the error I had when I tried step 17
What do I do please?
Thank you.
0 -
Hi @aadeola23,
It seems that in modifying the
cp
command in step #17 you managed to wipe thekubectl
client credentials stored in the.kube/config
file.Please revisit the previous step #16 and run again the 2nd, 3rd and 4th commands as presented, without any changes. If successful, then continue with step #17, by running the commands without any changes.
Regards,
-Chris0 -
Thanks Chris,
I have followed the steps as stated again but still getting the same error and I cannot move forward. I am not sure what you mean by:
"It seems that in modifying the cp command in step #17 you managed to wipe the kubectl client credentials stored in the .kube/config file."
I do not think I wiped the kubectl client credentials. I did not even edit the file I just closed it with "q!". Or maybe I do not understand what you mean.
What would you advise please?
Thank you.
0 -
Hi @aadeola23,
Between the suggested command in step#17 and the executed command visible in the terminal snippet there is a clear difference, which caused the
.kube/config
file to be overwritten by thecalico.yaml
file. If this outcome is unclear, please explore the Linux man pages on cp (the copy command) for clarification.If the suggested steps have been repeated as presented in the PDF lab guide, and the error persists, it may be due to an earlier step. Please provide the history of your commands you ran for this lab, and the
kubeadm-init.out
file provide it as an attachment.Regards,
-Chris1 -
Thanks a lot Chris.
I know where the problem is now. I should have used a '.' in step 17 while copying the calico file to the non-root user directory. Its okay now. Thanks so much.
See below:
student@master:~$ sudo cp /root/calico.yaml .
student@master:~$
student@master:~$
student@master:~$ kubectl apply -f calico.yaml
configmap/calico-config created
customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/caliconodestatuses.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipreservations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org created
clusterrole.rbac.authorization.k8s.io/calico-kube-controllers created
clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers created
clusterrole.rbac.authorization.k8s.io/calico-node created
clusterrolebinding.rbac.authorization.k8s.io/calico-node created
daemonset.apps/calico-node created
serviceaccount/calico-node created
deployment.apps/calico-kube-controllers created
serviceaccount/calico-kube-controllers created
Warning: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
poddisruptionbudget.policy/calico-kube-controllers created
student@master:~$0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 788 Linux Foundation IT Professional Programs
- 352 Cloud Engineer IT Professional Program
- 177 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 146 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 37 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 694 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 145 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 6 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 25 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 130 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 151 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 370 Off Topic
- 114 Introductions
- 173 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 96 All In Program
- 96 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)