LAB#3.4: Deployment is not coming to Available
I am not able to make my deployment available as per Lab 3.4. I followed the steps as per the doc to create the deployment of nginx. The deployment gets created but the status in Available is 0. Here is the outpu:
student@master-node:~$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 0/1 1 0 5m19s.
here are the logs for it :
student@master-node:~$ kubectl logs -f nginx-65f88748fd-ls6d9
Error from server (BadRequest): container "nginx" in pod "nginx-65f88748fd-ls6d9" is waiting to start: ContainerCreating
I am working on GCP Vm, docker engine is up. My user "student" is part of docker group and without sudo able to run docker images. I am not able to figure out why the deployment is not coming as active.
COuld some one please help...?
Thanks in Advance!
Shubhasis
Comments
-
Hello,
Are the various infrastructure pods running? Please run kubectl get pods --all-namespaces
If they are all running check to make sure all ports are open to all nodes in the VPC. If they are not running check the logs of each. Also please see if there are any errors in the output of kubectl get events
Regards,
0 -
Thanks for your reply. I see some exceptions.
Regarding namespaces: Coredns status are "COntainer Creating", rest are fine. Here is the logs:
student@master-node:~$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default nginx-65f88748fd-ls6d9 0/1 ContainerCreating 0 31m
kube-system calico-node-g655z 2/2 Running 2 15h
kube-system calico-node-wc2bs 2/2 Running 0 51m
kube-system coredns-fb8b8dccf-7pwbh 0/1 ContainerCreating 0 43m
kube-system coredns-fb8b8dccf-pjd5t 0/1 ContainerCreating 0 43m
kube-system etcd-master-node 1/1 Running 1 15h
kube-system kube-apiserver-master-node 1/1 Running 1 15h
kube-system kube-controller-manager-master-node 1/1 Running 1 15h
kube-system kube-proxy-6zgpl 1/1 Running 0 51m
kube-system kube-proxy-vd9t6 1/1 Running 1 15h
kube-system kube-scheduler-master-node 1/1 Running 1 15hFor the events log, I see the exceptions in form of warnings:
31m Warning FailedCreatePodSandBox pod/nginx-65f88748fd-ls6d9 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "b91c065e04ab892712d705833b8e76e08bc448c00a8bb226aa27a7339bb44101" network for pod "nginx-65f88748fd-ls6d9": NetworkPlugin cni failed to set up pod "nginx-65f88748fd-ls6d9_default" network: no podCidr for node master-node
6m39s Warning FailedCreatePodSandBox pod/nginx-65f88748fd-ls6d9 (combined from similar events): Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "1a34960163aee1b4ef59b8b3af0ba99c585f457929110933542fc96da2fe62ce" network for pod "nginx-65f88748fd-ls6d9": NetworkPlugin cni failed to set up pod "nginx-65f88748fd-ls6d9_default" network: no podCidr for node master-nodeI think VPC of my VM's running on GC is fine as I have set no firewalls.
Please suggest .
0 -
Please suggest, I think the problem lies with the fact that the core dns pods are not coming up and hence they are blocking the deployments. I will appreciate if I can find the solution of it. Struggling from last two days with no solution yet
0 -
@serewicz said:
Hello,
Are the various infrastructure pods running? Please run kubectl get pods --all-namespaces
If they are all running check to make sure all ports are open to all nodes in the VPC. If they are not running check the logs of each. Also please see if there are any errors in the output of kubectl get events
Regards,@serewicz said:
Hello,
Are the various infrastructure pods running? Please run kubectl get pods --all-namespaces
If they are all running check to make sure all ports are open to all nodes in the VPC. If they are not running check the logs of each. Also please see if there are any errors in the output of kubectl get events
Regards,Thanks for your reply Serewicz. I see some exceptions.
Regarding namespaces: Coredns status are "COntainer Creating", rest are fine. Here is the logs:
student@master-node:~$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default nginx-65f88748fd-ls6d9 0/1 ContainerCreating 0 31m
kube-system calico-node-g655z 2/2 Running 2 15h
kube-system calico-node-wc2bs 2/2 Running 0 51m
kube-system coredns-fb8b8dccf-7pwbh 0/1 ContainerCreating 0 43m
kube-system coredns-fb8b8dccf-pjd5t 0/1 ContainerCreating 0 43m
kube-system etcd-master-node 1/1 Running 1 15h
kube-system kube-apiserver-master-node 1/1 Running 1 15h
kube-system kube-controller-manager-master-node 1/1 Running 1 15h
kube-system kube-proxy-6zgpl 1/1 Running 0 51m
kube-system kube-proxy-vd9t6 1/1 Running 1 15h
kube-system kube-scheduler-master-node 1/1 Running 1 15hFor the events log, I see the exceptions in form of warnings:
31m Warning FailedCreatePodSandBox pod/nginx-65f88748fd-ls6d9 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "b91c065e04ab892712d705833b8e76e08bc448c00a8bb226aa27a7339bb44101" network for pod "nginx-65f88748fd-ls6d9": NetworkPlugin cni failed to set up pod "nginx-65f88748fd-ls6d9_default" network: no podCidr for node master-node
6m39s Warning FailedCreatePodSandBox pod/nginx-65f88748fd-ls6d9 (combined from similar events): Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "1a34960163aee1b4ef59b8b3af0ba99c585f457929110933542fc96da2fe62ce" network for pod "nginx-65f88748fd-ls6d9": NetworkPlugin cni failed to set up pod "nginx-65f88748fd-ls6d9_default" network: no podCidr for node master-nodeI think VPC of my VM's running on GC is fine as I have set no firewalls. It is indeed due to the core dns namespace not coming up. PLease help me here, stuck on this issue from last two days.
0 -
Hello,
If you did not go out of your way to open all ports, then the default settings of the VPC may be the issue. I would also go back and ensure that when you ran kubeadm init, you passed the exact IP range as is found in the calico.yaml file. You can also use wireshark or tcpdump on both nodes to see what traffic is leaving one and being accepted by the other. Chances are calico/Felix/BIRD communication is not making it through even if other traffic is seen.
If you review the setup video it will guide you in ensuring all ports are open between nodes, which I think is the issue.
Regards,
1 -
Hi,
Sometimes just deleting the coredns pods forces new ones to be created, and at times that may fix the issue. If that does not, then per @serewicz 's suggestion a custom VPC (not the default one) with a custom all-open firewall rule would enable all traffic between your nodes. The default firewalls for the default VPC are typically blocking some traffic, even if that is not immediately obvious.
Regards,
-Chris0 -
@serewicz said:
Hello,
If you did not go out of your way to open all ports, then the default settings of the VPC may be the issue. I would also go back and ensure that when you ran kubeadm init, you passed the exact IP range as is found in the calico.yaml file. You can also use wireshark or tcpdump on both nodes to see what traffic is leaving one and being accepted by the other. Chances are calico/Felix/BIRD communication is not making it through even if other traffic is seen.
If you review the setup video it will guide you in ensuring all ports are open between nodes, which I think is the issue.
Regards,@serewicz, Thanks so much. You nailed it right. The reason was I provided wrong CIDR range for my Pod Network which is calico in my case. Re initializing the kubeadm did the trick.
Thanks Again!> @chrispokorni said:Hi,
Sometimes just deleting the coredns pods forces new ones to be created, and at times that may fix the issue. If that does not, then per @serewicz 's suggestion a custom VPC (not the default one) with a custom all-open firewall rule would enable all traffic between your nodes. The default firewalls for the default VPC are typically blocking some traffic, even if that is not immediately obvious.
Regards,
-ChrisThanks Chris for looking at it... I realize the reason to be not given the right cidr while applying the network configuration, in my case it was calico. Thanks for checking it... all default pods are up now!
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
- 146 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
- 371 Off Topic
- 114 Introductions
- 174 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)