> 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/etcd-backup-addon-fails-to-generate-backups-if-etcdctl-cacert--e.md).

# etcd-backup addon fails to generate backups if ETCDCTL\_CACERT, ETCDCTL\_CERT and ETCDCTL\_KEY is set i

## Problem

* etcd-backup addon fails to generate backups if ETCDCTLCACERT, ETCDCTL CERT and ETCDCTL\_KEY is set in the cronjob.
* Below environment variables are set in etcd-backup cronjob:

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

```javascript
# kubectl -n kube-system get cronjob etcd-backup-with-interval -o yaml |grep -A7 ETCDCTL_CACERT
            - name: ETCDCTL_CACERT
              value: /certs/apiserver/etcd/ca.crt
            - name: ETCDCTL_CERT
              value: /certs/apiserver/etcd/request.crt
            - name: ETCDCTL_KEY
              value: /certs/apiserver/etcd/request.key
```

{% endtab %}
{% endtabs %}

* etcd-backup pods remain in NotReady state:

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

```javascript
# kubectl get pod -o wide | grep etcd
etcd-backup-with-interval-27801890-zjghf   1/2     NotReady   0                7m41s   10.164.209.47    10.164.209.47   <none>           <none>
```

{% endtab %}
{% endtabs %}

* db.part files are created in the backup path:

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

```javascript
# kubectl logs etcd-backup-with-interval-27801890-zjghf etcd-backup
{"level":"info","ts":1668113401.1358364,"caller":"snapshot/v3_snapshot.go:119","msg":"created temporary db file","path":"/backup/etcd-snapshot-2022-11-10_20:50:01_UTC.db.part"}%
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed Kubernetes - v5.6.1(kubernetes version 1.23)

## Resolution

* Edit the cronjob and remove below 6 environment variables:

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

```javascript
# kubectl -n kube-system edit cronjob etcd-backup-with-interval

>> Remove below 6 lines and save the config:
            - name: ETCDCTL_CACERT
              value: /certs/apiserver/etcd/ca.crt
            - name: ETCDCTL_CERT
              value: /certs/apiserver/etcd/request.crt
            - name: ETCDCTL_KEY
              value: /certs/apiserver/etcd/request.key
```

{% endtab %}
{% endtabs %}

* Then check if the backups work.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://platform9.com/kb/pmk/solutions/etcd-backup-addon-fails-to-generate-backups-if-etcdctl-cacert--e.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
