IT Certifications and Careers (Official Discussion Thread)

EnzoG

All Star
Joined
Jan 14, 2014
Messages
4,548
Reputation
440
Daps
8,758
Reppin
HOUS-e-
So I'm working to create a deployment and it's stuck in a pending state with no events as to why it's in a pending state.
I'm in the Level Up In Tech cloud program and I'm working on a Kubernetes project
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,784
Reputation
25,242
Daps
131,627
So I'm working to create a deployment and it's stuck in a pending state with no events as to why it's in a pending state.
kubectl describe pod pod-name
You should get a listing of events at the bottom of the output that should clue you in.
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,784
Reputation
25,242
Daps
131,627
When I do that it doesn't show the events
Ok that suggests to me that there's a dependency that isn't available. Is there a service or something that the pod is depending on? Or maybe the Kubernetes cluster doesn't have enough resources for your deployment?
 

EnzoG

All Star
Joined
Jan 14, 2014
Messages
4,548
Reputation
440
Daps
8,758
Reppin
HOUS-e-
Ok that suggests to me that there's a dependency that isn't available. Is there a service or something that the pod is depending on? Or maybe the Kubernetes cluster doesn't have enough resources for your deployment?

How would I go about checking the resources??
 
Last edited:

Tr0yTV

All Star
Joined
Mar 20, 2017
Messages
1,235
Reputation
916
Daps
5,136
How would I go about checking the resources??
cluster is set to be cordoned which means no nodes can be scheduled. run kubectl get nodes and see if the status says it cannot be scheduled.
 

EnzoG

All Star
Joined
Jan 14, 2014
Messages
4,548
Reputation
440
Daps
8,758
Reppin
HOUS-e-
this is what I get:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events: <none>
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,784
Reputation
25,242
Daps
131,627
How would I go about checking the resources??
I'd do
kubectl get pvc
kubectl get services
kubectl get volumes
If your yaml is referencing something in there and it doesn't exist, it'll stay in pending. You can try doing a trivial deployment - something that doesn't have any extra configuration, just gets a pod and a container out there. Can you post the yaml you're using?
 

EnzoG

All Star
Joined
Jan 14, 2014
Messages
4,548
Reputation
440
Daps
8,758
Reppin
HOUS-e-
I'd do
kubectl get pvc
kubectl get services
kubectl get volumes
If your yaml is referencing something in there and it doesn't exist, it'll stay in pending. You can try doing a trivial deployment - something that doesn't have any extra configuration, just gets a pod and a container out there. Can you post the yaml you're using?

I didn't create a yaml file i just ran a kubectl create deployment <my deployment name> --image=nginx command and that's when i get my pending status when I check my pod
 

Obreh Winfrey

Truly Brehthtaking
Supporter
Joined
Nov 18, 2016
Messages
20,784
Reputation
25,242
Daps
131,627
I didn't create a yaml file i just ran a kubectl create deployment <my deployment name> --image=nginx command and that's when i get my pending status when I check my pod
Ok that's new to me. I've always created resources from YAML. I thought maybe it's a namespace and permissions issue, but the cluster should have blocked you from even getting anything out there. This could be a node issue like NoName was getting at.
 

EnzoG

All Star
Joined
Jan 14, 2014
Messages
4,548
Reputation
440
Daps
8,758
Reppin
HOUS-e-
Ok that's new to me. I've always created resources from YAML. I thought maybe it's a namespace and permissions issue, but the cluster should have blocked you from even getting anything out there. This could be a node issue like NoName was getting at.
Could I send you an article on the project??
 
Top