# How to Verify if the ETCD Secrets Are Encrypted or Not?

## Problem

* How to verify if ETCD secrets are actually encrypted after configuring [ETCD secret encryption](https://platform9.com/docs/kubernetes/etcd-secrets-encryption)?

## Environment

* Platform9 Managed Kubernetes - v5.2 and above
* Kubernetes v1.20 and above
* Docker or Containerd

## Answer

* ETCD secret encryption can be verified with the help of `etcdctl` command line utility.
* ETCD secrets are stored at the path `/registry/secrets/$namespace/$secret` on the master node.
* The below command can be used to verify if the particular ETCD secret is encrypted or not.

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

```javascript
# ETCDCTL_API=3 etcdctl get /registry/secrets/default/secret1 [...] | hexdump -C
{% endtab %}
{% tab language="bash" title="Containerd" %}
# /opt/pf9/pf9-kube/bin/etcdctl --cacert=/etc/pf9/kube.d/certs/etcdctl/etcd/ca.crt --cert=/etc/pf9/kube.d/certs/etcdctl/etcd/request.crt --key=/etc/pf9/kube.d/certs/etcdctl/etcd/request.key  get /registry/secrets/default/secret1 [...] | hexdump -C
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://platform9.com/kb/pmk/how-to/how-to-verify-if-the-etcd-secrets-are-encrypted-or-not.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
