Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing kube-apiserver and other pods #17298

Open
ankur6ue opened this issue Mar 2, 2025 · 15 comments
Open

missing kube-apiserver and other pods #17298

ankur6ue opened this issue Mar 2, 2025 · 15 comments

Comments

@ankur6ue
Copy link

ankur6ue commented Mar 2, 2025

I'm trying to create a kubernetes cluster on AWS using:

kops create cluster --zones=us-east-1a --name=dev.k8s.local --state=s3://<bucket_name> --discovery-store=s3://<bucket_name>/${NAME}/discovery --node-size t2.small --master-size t2.small --node-count 1

However the cluster never gets in a healthy state.

Output of kops validate

Image

output of kubectl get pods -n kube-system

Image

Please help.. using kops version 1.31.0

@hakman
Copy link
Member

hakman commented Mar 3, 2025

@ankur6ue t2.small is too small for control plane. Use t2.medium instead or some other instance type with 4GB or memory..

@ankur6ue
Copy link
Author

ankur6ue commented Mar 3, 2025

Thanks for the reply. I used t2.medium for the control plane, but get the same as before:

Image

@ankur6ue
Copy link
Author

ankur6ue commented Mar 3, 2025

any ideas?

@hakman
Copy link
Member

hakman commented Mar 3, 2025

try adding --dns=none when creating the cluster.

@ankur6ue
Copy link
Author

ankur6ue commented Mar 8, 2025

Exactly the same as before
kops create cluster --zones=us-east-1a --cloud=aws --name=dev.k8s.local --state=s3://ankur-kops-k8s-state-store --discovery-store=s3://ankur-kops-k8s-oidc-store/${NAME}/discovery --node-size t2.medium --master-size t2.small --node-count 1 --dns=none

Image

I verified the AWS resources (EC2 instances, security groups etc) are created as expected. Also ran journalctl -u kops-configuration.service. on the control plane node, and nodeup seems to be succeeding.

Any other ideas? I'm following the instructions on the deploying to AWS page to the letter.. this used to work when I last tried 2 years ago. Using latest version of kops, kubernetes etc.

@ankur6ue
Copy link
Author

ankur6ue commented Mar 8, 2025

This is the output of kubectl get pods -n kube-system

Image

@ankur6ue
Copy link
Author

ankur6ue commented Mar 8, 2025

In the above, I was still using a small size node as the master node. I corrected that error, but the results are the same:

Image

@rifelpet
Copy link
Member

Can you run kubect describe pod on each pod that is stuck in pending? the Events at the bottom of the output should reveal why they aren't being scheduled.

@ankur6ue
Copy link
Author

any ideas/suggestions on the above?

@ankur6ue
Copy link
Author

I ran describe pod on the pending pods, the outputs are:
coredns-autoscaler pod:

Image

coredns pod:

Image

ebs-csi-controller pod

Image

so these pending pods are waiting for cloud-controller-manager pod.. and that's in a crashloop, with the following describe pod output:

Image

@ankur6ue
Copy link
Author

The logs on the cloud-controller-manager pod are:

Image

so appears to be some permissions issue?

@ankur6ue
Copy link
Author

I'm running kops as IAM user kops, which is part of IAM group kops, as suggested in the instructions. The IAM permissions for the group and the user appear to be correct

Image

@ankur6ue
Copy link
Author

Also checked the OIDC bucket and there is a jwks file in discovery//openid/v1. I'm not an expert in OIDC, so not sure what more I should look for.. please help!

@rifelpet
Copy link
Member

Is the OIDC bucket publicly accessible? You should be able to curl the JWKS object's HTTPS URL without authentication.

For example: curl https://$bucket.s3.$region.amazonaws.com/$prefix/openid/v1/jwks

@ankur6ue
Copy link
Author

ankur6ue commented Mar 12, 2025

Thanks for the suggestion, tried it and it is publicly accessible. Returns:

{
"keys": [
{
"use": "sig",
"kty": "RSA",
"kid":

etc
any other ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants