> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmk/solutions/pod-etcd-backup-with-interval-not-ready.md).

# Pod "etcd-backup-with-interval-" in "NotReady" State

## Problem

One or more `etcd-backup-with-interval-` pods in the `kube-system` namespace are in a `NotReady` state, e.g.

{% tabs %}
{% tab title="Bash" %}

```bash
$ kubectl get pods -n kube-system | grep etcd
etcd-backup-with-interval-28050660--1-kd7pg 1/2 NotReady 0 17m
```

{% endtab %}
{% endtabs %}

The pod is associated with a job which is showing 0/1 completions, e.g.

{% tabs %}
{% tab title="Bash" %}

```bash
$ kubectl get jobs -n kube-system | grep 28050660
etcd-backup-with-interval-28050660   0/1           245d       245d
```

{% endtab %}
{% endtabs %}

The pod log shows only that it has created a temporary DB file with no further output, e.g.

{% tabs %}
{% tab title="Bash" %}

```bash
{"level":"info","ts":1704221964.2963,"caller":"snapshot/v3_snapshot.go:119","msg":"created temporary db file","path":"/backup/etcd-snapshot-2024-01-02_18:59:24_UTC.db.part"}%
```

{% endtab %}
{% endtabs %}

A `kubectl describe job` shows that the `State` is `Running` .

{% tabs %}
{% tab title="Bash" %}

```bash
etcd-backup:
...
    Image:         gcr.io/etcd-development/etcd:v3.4.14
...
    Command:
      /bin/sh
    Args:
      -c
      etcdctl snapshot save /backup/etcd-snapshot-$(date +%Y-%m-%d_%H:%M:%S_%Z).db
    State:          Running
      Started:      Tue, 02 Jan 2024 12:59:24 -0600
    Ready:          True
    Restart Count:  0
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed Kubernetes – v5.7 and Higher

## Cause

The `etcdctl snapshot save` command is "hanging" or failing to complete as it is missing the following `Environment` section/variables which control the flags to be passed to the `etcdctl` command-line utility which are necessary for TLS authentication.

{% tabs %}
{% tab title="Bash" %}

```bash
Environment:
      ETCDCTL_API:     3
      ETCDCTL_CACERT:  /certs/apiserver/etcd/ca.crt
      ETCDCTL_CERT:    /certs/apiserver/etcd/request.crt
      ETCDCTL_KEY:     /certs/apiserver/etcd/request.key
```

{% endtab %}
{% endtabs %}

Thus, the `job` never transitions to `Succeeded` or `Failed` and the pod will continue to be re-created.

## Resolution

1. Delete the `job` which is associated with the `pod` .
2. The `pod` will be terminated, and a new pod will be re-created associated with a new `job` resource which is using an updated spec template.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pmk/solutions/pod-etcd-backup-with-interval-not-ready.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
