# Get "readiness probe failed" error when deploy to K8S

**URL:** <https://discuss.elastic.co/t/get-readiness-probe-failed-error-when-deploy-to-k8s/286333>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [October 11, 2021, 5:11am UTC](https://discuss.elastic.co/t/get-readiness-probe-failed-error-when-deploy-to-k8s/286333 "2021-10-11T05:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaoyi0113](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhaoyi0113/32/99567_2.png) [@zhaoyi0113](https://discuss.elastic.co/u/zhaoyi0113)\
**Post date:** [October 11, 2021, 5:11am UTC](https://discuss.elastic.co/t/get-readiness-probe-failed-error-when-deploy-to-k8s/286333/1 "2021-10-11T05:11:05Z")

</div>

I am trying to deploy Elasticsearch cluster to AWS EKS. I have this spec:

```auto
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: datasource
spec:
  version: 7.14.0
  nodeSets:
  - name: node
    count: 3
    config:
      xpack.security.http.ssl.enabled: false
      xpack.security.transport.ssl.enabled: false
      xpack.security.enabled: false
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
        containers:
        - name: elasticsearch
          readinessProbe:
            exec:
              command:
              - bash
              - -c
              - /mnt/elastic-internal/scripts/readiness-probe-script.sh
            failureThreshold: 3
            initialDelaySeconds: 10
            periodSeconds: 12
            successThreshold: 1
            timeoutSeconds: 12
          env:
          - name: READINESS_PROBE_TIMEOUT
            value: "30"
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
          - ReadWriteOnce
        storageClassName: ebs-sc
        resources:
          requests:
            storage: 1024Gi

```

But after apply this spec, I got this error message:

```auto
{"type": "server", "timestamp": "2021-10-11T05:04:50,470Z", "level": "INFO", "component": "o.e.c.r.a.AllocationService", "cluster.name": "datasource", "node.name": "datasource-es-node-0", "message": "Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]]).", "cluster.uuid": "pzd0YJS8RQyVlimhmN-p9A", "node.id": "vDvCWlv_SOOfecYzY8ZoAw" }
{"timestamp": "2021-10-11T05:04:52+00:00", "message": "readiness probe failed", "curl_rc": "35"}
{"timestamp": "2021-10-11T05:04:57+00:00", "message": "readiness probe failed", "curl_rc": "35"}
{"timestamp": "2021-10-11T05:05:02+00:00", "message": "readiness probe failed", "curl_rc": "35"}
{"timestamp": "2021-10-11T05:05:07+00:00", "message": "readiness probe failed", "curl_rc": "35"}
{"timestamp": "2021-10-11T05:05:12+00:00", "message": "readiness probe failed", "curl_rc": "35"}
{"timestamp": "2021-10-11T05:05:17+00:00", "message": "readiness probe failed", "curl_rc": "35"}
{"timestamp": "2021-10-11T05:05:22+00:00", "message": "readiness probe failed", "curl_rc": "35"}

```

You can see it shows GREEN first but show `readiness probe failed` afterward. How can I solve this issue?

---

<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 8, 2021, 5:11am UTC](https://discuss.elastic.co/t/get-readiness-probe-failed-error-when-deploy-to-k8s/286333/2 "2021-11-08T05:11:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
