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
- 51 LFX Mentorship
- 104 LFX Mentorship: Linux Kernel
- 576 Linux Foundation IT Professional Programs
- 304 Cloud Engineer IT Professional Program
- 125 Advanced Cloud Engineer IT Professional Program
- 53 DevOps Engineer IT Professional Program
- 61 Cloud Native Developer IT Professional Program
- 5 Express Training Courses
- 5 Express Courses - Discussion Forum
- 2.1K Training Courses
- 19 LFC110 Class Forum
- 7 LFC131 Class Forum
- 27 LFD102 Class Forum
- 158 LFD103 Class Forum
- 21 LFD121 Class Forum
- 1 LFD137 Class Forum
- 61 LFD201 Class Forum
- 1 LFD210 Class Forum
- LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- LFD237 Class Forum
- 23 LFD254 Class Forum
- 612 LFD259 Class Forum
- 105 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 1 LFD273 Class Forum
- 2 LFS145 Class Forum
- 25 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 11 LFS203 Class Forum
- 76 LFS207 Class Forum
- 300 LFS211 Class Forum
- 54 LFS216 Class Forum
- 47 LFS241 Class Forum
- 41 LFS242 Class Forum
- 37 LFS243 Class Forum
- 11 LFS244 Class Forum
- 37 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 141 LFS253 Class Forum
- LFS254 Class Forum
- 1.1K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 93 LFS260 Class Forum
- 132 LFS261 Class Forum
- 33 LFS262 Class Forum
- 80 LFS263 Class Forum
- 15 LFS264 Class Forum
- 11 LFS266 Class Forum
- 18 LFS267 Class Forum
- 18 LFS268 Class Forum
- 23 LFS269 Class Forum
- 203 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- LFS281 Class Forum
- 236 LFW211 Class Forum
- 172 LFW212 Class Forum
- 7 SKF100 Class Forum
- SKF200 Class Forum
- 903 Hardware
- 219 Drivers
- 74 I/O Devices
- 44 Monitors
- 116 Multimedia
- 209 Networking
- 101 Printers & Scanners
- 85 Storage
- 763 Linux Distributions
- 88 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 24 openSUSE
- 142 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 357 Ubuntu
- 479 Linux System Administration
- 41 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 78 Network Management
- 108 System Management
- 49 Web Management
- 68 Mobile Computing
- 23 Android
- 30 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 538 Off Topic
- 131 Introductions
- 217 Small Talk
- 22 Study Material
- 826 Programming and Development
- 278 Kernel Development
- 514 Software Development
- 928 Software
- 260 Applications
- 184 Command Line
- 3 Compiling/Installing
- 76 Games
- 316 Installation
- 61 All In Program
- 61 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)