# Failed to get API Group-Resources

**URL:** <https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [January 19, 2021, 1:22pm UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548 "2021-01-19T13:22:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![karasamil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karasamil/32/82539_2.png) [@karasamil](https://discuss.elastic.co/u/karasamil)\
**Post date:** [January 19, 2021, 1:22pm UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548/1 "2021-01-19T13:22:47Z")

</div>

I am trying to deploy Elastic Cloud on kubernetes. When I first tryed i have managed to start elasticsearch on kubernetes cluster. But now for some reason, when i try to deploy same quickstart elasticsearch it never even deploy a pod for it. No services made for it. I think becase of elastic-operator is shutting down at start up.

I have tryed to delete all-in-one.yml and redeploy it, i have tryed to reset the cluster and re deploy it. None of them worked. I am successfully deploying other non Elastic pods. The logs for elastic-operator is in bellow (prettifyed):

```auto
    {
   "log.level":"info",
   "@timestamp":"2021-01-19T13:04:41.881Z",
   "log.logger":"manager",
   "message":"maxprocs: Updating GOMAXPROCS=1: determined from CPU quota",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0"
}{
   "log.level":"info",
   "@timestamp":"2021-01-19T13:04:41.882Z",
   "log.logger":"manager",
   "message":"Setting default container registry",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0",
   "container_registry":"docker.elastic.co"
}{
   "log.level":"info",
   "@timestamp":"2021-01-19T13:04:41.882Z",
   "log.logger":"manager",
   "message":"Setting up scheme",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0"
}{
   "log.level":"info",
   "@timestamp":"2021-01-19T13:04:41.887Z",
   "log.logger":"manager",
   "message":"Operator configured to manage all namespaces",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0"
}{
   "log.level":"error",
   "@timestamp":"2021-01-19T13:05:11.888Z",
   "log.logger":"controller-runtime.manager",
   "message":"Failed to get API Group-Resources",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0",
   "error":"Get \"https://10.96.0.1:443/api?timeout=1m0s\": dial tcp 10.96.0.1:443: i/o timeout",
   "error.stack_trace":"sigs.k8s.io/controller-runtime/pkg/manager.New\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.3/pkg/manager/manager.go:279\ngithub.com/elastic/cloud-on-k8s/cmd/manager.startOperator\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:484\ngithub.com/elastic/cloud-on-k8s/cmd/manager.doRun.func2\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:319"
}{
   "log.level":"error",
   "@timestamp":"2021-01-19T13:05:11.888Z",
   "log.logger":"manager",
   "message":"Failed to create controller manager",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0",
   "error":"Get \"https://10.96.0.1:443/api?timeout=1m0s\": dial tcp 10.96.0.1:443: i/o timeout",
   "error.stack_trace":"github.com/elastic/cloud-on-k8s/cmd/manager.startOperator\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:486\ngithub.com/elastic/cloud-on-k8s/cmd/manager.doRun.func2\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:319"
}{
   "log.level":"error",
   "@timestamp":"2021-01-19T13:05:11.888Z",
   "log.logger":"manager",
   "message":"Shutting down due to error",
   "service.version":"1.3.1+a0a0a212",
   "service.type":"eck",
   "ecs.version":"1.4.0",
   "error":"Get \"https://10.96.0.1:443/api?timeout=1m0s\": dial tcp 10.96.0.1:443: i/o timeout",
   "error.stack_trace":"github.com/elastic/cloud-on-k8s/cmd/manager.doRun\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:327\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887\nmain.main\n\t/go/src/github.com/elastic/cloud-on-k8s/cmd/main.go:30\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:204"
}

```

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [January 19, 2021, 2:06pm UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548/2 "2021-01-19T14:06:05Z")

</div>

It looks like the operator has trouble reaching the k8s control plane specifically the k8s apiserver. But I am assuming that the k8s apiserver is healthy because you say you can deploy other Pods successfully. But maybe worth double checking the health of the control plane just to be sure.

Do you have any firewall rules preventing the operator from reaching the control plane? It could also be a k8s NetworkPolicy.

---

<div class="post-metadata">

**Author:** ![karasamil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karasamil/32/82539_2.png) [@karasamil](https://discuss.elastic.co/u/karasamil)\
**Post date:** [January 19, 2021, 2:20pm UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548/3 "2021-01-19T14:20:13Z")

</div>

Ok thank you for your reply, when i run `kubectl get cs` i get;

```auto
    NAME STATUS MESSAGE ERROR
    scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused   
    controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused   
    etcd-0 Healthy {"health":"true"} 

```

`kubectl get --raw='/readyz'` gives ok result.

I dont have any firewall rules.

I am using standalone containerd runtime. Yesterday someone from us installed docker in master node. Maybe this caused the issue I dont know. I have deleted docker but this didnt help.

---

<div class="post-metadata">

**Author:** ![rashijain\_NEC](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rashijain\_NEC](https://discuss.elastic.co/u/rashijain_NEC)\
**Post date:** [March 9, 2022, 5:51pm UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548/4 "2022-03-09T17:51:54Z")

</div>

Pls share the solution .

---

<div class="post-metadata">

**Author:** ![mhadidg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mhadidg/32/103982_2.png) [@mhadidg](https://discuss.elastic.co/u/mhadidg)\
**Post date:** [May 30, 2022, 9:40am UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548/5 "2022-05-30T09:40:59Z")

</div>

I'm experiencing the same issue, have you found any solution?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:22am UTC](https://discuss.elastic.co/t/failed-to-get-api-group-resources/261548/6 "2022-11-04T08:22:00Z")

</div>


