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

no error when terraform apply, but get node "No resources found." #388

Closed
3 tasks
phuthinh2202 opened this issue Jun 5, 2019 · 6 comments
Closed
3 tasks

Comments

@phuthinh2202
Copy link

phuthinh2202 commented Jun 5, 2019

I have issues

no error appear when i enter "terraform apply", but when it done, i get view node, it say "no resources found".

I'm submitting a...

  • bug report
  • feature request
  • [ v] support request
  • kudos, thank you, warm fuzzy

What is the current behavior?

`$ kubectl get all --all-namespaces=true
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/coredns-6446cc57d9-ctntj 0/1 Pending 0 9m31s
kube-system pod/coredns-6446cc57d9-tnwl6 0/1 Pending 0 9m31s

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 172.20.0.1 443/TCP 9m41s
kube-system service/kube-dns ClusterIP 172.20.0.10 53/UDP,53/TCP 9m41s

NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/aws-node 0 0 0 0 0 9m31s
kube-system daemonset.apps/kube-proxy 0 0 0 0 0 9m36s

NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
kube-system deployment.apps/coredns 2 2 2 0 9m31s

NAMESPACE NAME DESIRED CURRENT READY AGE
kube-system replicaset.apps/coredns-6446cc57d9 2 2 0 9m32s
$ kubectl get all --all-namespaces=true
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system pod/coredns-6446cc57d9-ctntj 0/1 Pending 0 13m
kube-system pod/coredns-6446cc57d9-tnwl6 0/1 Pending 0 13m

NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 172.20.0.1 443/TCP 13m
kube-system service/kube-dns ClusterIP 172.20.0.10 53/UDP,53/TCP 13m

NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/aws-node 0 0 0 0 0 13m
kube-system daemonset.apps/kube-proxy 0 0 0 0 0 13m

NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
kube-system deployment.apps/coredns 2 2 2 0 13m

NAMESPACE NAME DESIRED CURRENT READY AGE
kube-system replicaset.apps/coredns-6446cc57d9 2 2 0 13m
$ kubectl get configmaps
No resources found.
$ kubectl --namespace=kube-system get configmap
NAME DATA AGE
aws-auth 3 11m
coredns 1 17m
extension-apiserver-authentication 5 17m
kube-proxy 1 17m
kube-proxy-config 1 17m
$ kubectl get nodes
No resources found.`

If this is a bug, how to reproduce? Please include a code sample if relevant.

What's the expected behavior?

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

  • Affected module version: 4.0.2
  • OS: MacOS
  • Terraform version:
    Terraform v0.11.13
  • provider.aws v2.13.0
  • provider.local v1.2.2
  • provider.null v2.1.2
  • provider.template v2.1.2

Any other relevant info

@phuthinh2202
Copy link
Author

phuthinh2202 commented Jun 5, 2019

I use "worker_groups_launch_template_mixed" no work, but when i change to worker_group like example:
worker_groups = [
{
name = "on-demand-1"
instance_type = "m4.xlarge"
asg_max_size = 1
autoscaling_enabled = true
kubelet_extra_args = "--node-labels=kubernetes.io/lifecycle=normal"
suspended_processes = "AZRebalance"
},
{
name = "spot-1"
spot_price = "0.199"
instance_type = "c4.xlarge"
asg_max_size = 20
autoscaling_enabled = true
kubelet_extra_args = "--node-labels=kubernetes.io/lifecycle=spot"
suspended_processes = "AZRebalance"
},
{
name = "spot-2"
spot_price = "0.20"
instance_type = "m4.xlarge"
asg_max_size = 20
autoscaling_enabled = true
kubelet_extra_args = "--node-labels=kubernetes.io/lifecycle=spot"
suspended_processes = "AZRebalance"
}
]

then work.

@max-rocket-internet
Copy link
Contributor

Hi @phuthinh2202, this is normally because either:

  1. Nodes can't reach EKS endpoint. (e.g. in private subnet)
  2. Nodes can't authenticate to EKS service. (e.g. the aws-auth configmap was not applied, wrong instance profile, etc)

Maybe have a look at these similar issues:
#358
#310
#304

@phuthinh2202
Copy link
Author

the different between "no work" with "worked", i just edit from "worker_groups_launch_template_mixed" to use "worker_groups" and about the result is same, include the aws-auth configmap was created. :D

@max-rocket-internet
Copy link
Contributor

So it's resolved?

@phuthinh2202
Copy link
Author

yah, i used "worker_group" have no problem. I can access my eks cluster, but all worker have public ipv4, althrough i have set public_ip = false in "worker_group" object.

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants