Skip to content

Commit ef69201

Browse files
committed
Incorp revisions
1 parent 89bf68e commit ef69201

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

AKS-Arc/encrypt-etcd-secrets.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,43 +66,32 @@ kubectl exec --stdin --tty <etcd pod name> -n kube-system --etcdctl --cacert /et
6666
```
6767

6868
- `kubectl exec`: This is the kubectl command used to execute a command inside a running pod. It allows you to run commands within the container of a pod.
69-
- `--stdin`: This flag allows you to send input (stdin) to the command you are running inside the pod.
70-
- `--tty`: This flag allocates a TTY (terminal) for the command, making it behave like you are interacting with a terminal session.
69+
- `--stdin`: This flag allows you to send input (stdin) to the command you are running inside the pod.
70+
- `--tty`: This flag allocates a TTY (terminal) for the command, making it behave as though you're interacting with a terminal session.
7171
- `<etcd pod name>`: to find the etcd pod name, run the following command:
7272

7373
```azurecli
7474
kubectl get pods -n kube-system | findstr etcd-moc
7575
```
7676

77-
- `-n kube-system`: This flag specifies the namespace where the pod is located. kube-system is the default namespace used by Kubernetes for system components, such as etcd and other control plane services.
77+
- `-n kube-system`: Specifies the namespace where the pod is located. **kube-system** is the default namespace used by Kubernetes for system components, such as etcd and other control plane services.
7878
- `--etcdctl`: Reads the secret from etcd. Additional fields are used for authentication prior to getting access to etcd.
7979

8080
The following fields are returned in the command output:
8181

8282
```output
8383
"ClusterID" : <cluster id>
84-
8584
"MemberID" : <member id>
86-
87-
"Revision" : <revision number>
88-
85+
"Revision" : <revision number>
8986
"RaftTerm" : 2
90-
9187
"Key" : <path to the key>
92-
93-
"CreateRevision" : < revision number at the time the key was created>
94-
95-
"ModRevision" : <revision number at the time the key was modified >
96-
97-
"Version" : <The version of the key-value pair in etcd >
98-
88+
"CreateRevision" : <revision number at the time the key was created>
89+
"ModRevision" : <revision number at the time the key was modified>
90+
"Version" : <version of the key-value pair in etcd>
9991
"Value" : "k8s:enc:kms:v1:kms-plugin: <encrypted secret value>"
100-
101-
"Lease" : <The lease associated with the secret>
102-
103-
"More" : <Indicates if there are more results>
104-
105-
"Count" : <The number of key-value pairs returned>
92+
"Lease" : <lease associated with the secret>
93+
"More" : <indicates if there are more results>
94+
"Count" : <number of key-value pairs returned>
10695
```
10796

10897
After you run the command, examine the `Value` field in the output in the terminal window. This output shows the value stored in etcd secret store for this key, which is the encrypted value of the secret. The value is encrypted using a KMS plugin. The `k8s:enc:kms:v1:` prefix indicates that Kubernetes is using the KMS v1 plugin to store the secret in an encrypted format.

0 commit comments

Comments
 (0)