gitpod-io / gitpod-eks-guide

This repo is being deprecated in favor of the single cluster reference architecture and the corresponding Terraform config.
https://www.gitpod.io/docs/configure/self-hosted/latest/reference-architecture/single-cluster-ref-arch
MIT License
51 stars 18 forks source link

eksctl command throws 'invalid memory address' error #20

Closed sudoarslan closed 3 years ago

sudoarslan commented 3 years ago

Facing the following issue with while running make install:

Starting install process...
touch /Users/arslan/GitStart/gitpod-eks-guide/.kubeconfig
Using eksctl configuration file: eks-cluster.yaml
Missing (optional) AWS profile.
Missing (optional) ROUTE53_ZONEID environment variable.
Please configure the CNAME with the URL of the load balancer manually.
 ⏳  Bootstrapping environment aws://382358065587/us-west-1...
 ✅  Environment aws://382358065587/us-west-1 bootstrapped (no changes).
2021-08-19 23:25:18 [ℹ]  eksctl version 0.60.0
2021-08-19 23:25:18 [ℹ]  using region us-west-1
2021-08-19 23:25:19 [✔]  saved kubeconfig as ".kubeconfig"
daemonset.apps/aws-node patched (no change)
configmap/calico-config unchanged
customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org configured
clusterrole.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrole.rbac.authorization.k8s.io/calico-node unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-node unchanged
daemonset.apps/calico-node configured
serviceaccount/calico-node unchanged
deployment.apps/calico-kube-controllers unchanged
serviceaccount/calico-kube-controllers unchanged
poddisruptionbudget.policy/calico-kube-controllers unchanged
2021-08-19 23:25:39 [ℹ]  eksctl version 0.60.0
2021-08-19 23:25:39 [ℹ]  using region us-west-1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x22522a9]

goroutine 1 [running]:
github.com/weaveworks/eksctl/pkg/eks.(*NodeGroupService).expandInstanceSelector(0xc0000b30a0, 0xc0003db620, 0xc000456380, 0x2, 0x2, 0x7ff6eac57c38, 0x7ff6ea9b1538, 0x20, 0x20, 0x7ff7118b05b8)
    github.com/weaveworks/eksctl/pkg/eks/nodegroup_service.go:207 +0x1a9
github.com/weaveworks/eksctl/pkg/eks.(*NodeGroupService).ExpandInstanceSelectorOptions(0xc0000b30a0, 0xc0000f8ac0, 0x2, 0x2, 0xc000456380, 0x2, 0x2, 0x0, 0xc000a895c0)
    github.com/weaveworks/eksctl/pkg/eks/nodegroup_service.go:139 +0x215
github.com/weaveworks/eksctl/pkg/actions/nodegroup.(*Manager).Create(0xc000a895c0, 0x10000010101, 0x38a0db0, 0xc000872020, 0xc000a895c0, 0x0)
    github.com/weaveworks/eksctl/pkg/actions/nodegroup/create.go:81 +0x4a2
github.com/weaveworks/eksctl/pkg/ctl/create.createNodeGroupCmd.func1(0xc00060a210, 0xc0009ae140, 0x101, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0)
    github.com/weaveworks/eksctl/pkg/ctl/create/nodegroup.go:60 +0x3c5
github.com/weaveworks/eksctl/pkg/ctl/create.createNodeGroupCmdWithRunFunc.func1(0xc000998a00, 0xc000595270, 0x0, 0x1, 0x0, 0x0)
    github.com/weaveworks/eksctl/pkg/ctl/create/nodegroup.go:86 +0x106
github.com/spf13/cobra.(*Command).execute(0xc000998a00, 0xc000595250, 0x1, 0x1, 0xc000998a00, 0xc000595250)
    github.com/spf13/cobra@v1.2.1/command.go:856 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc0005cbb80, 0xc000595120, 0x1, 0xc000a3ff70)
    github.com/spf13/cobra@v1.2.1/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.2.1/command.go:902
main.main()
    github.com/weaveworks/eksctl/cmd/eksctl/main.go:77 +0x41b
make: *** [install] Error 2

(These logs are generated as a result of re-running the make install, the first run also failed with the same error) It seems like the cluster is created but when I do kubectl get pods I don't see any pods in the cluster.

I haven't made many changes to the to the eks-cluster.yaml file given in the example here. Is there anyone else facing the same issue?

aledbf commented 3 years ago

Closing. Please download latest version before running make install docker pull ghcr.io/gitpod-io/gitpod-eks-guide:latest

Edit: the issue is related to eksctl fixed in v1.61.0

sudoarslan commented 3 years ago

Yes, that works. Thanks a lot for the quick reply :)