Skip to content

Commit

Permalink
doc(k8s): Add getting secrets to kubectl FAQ (#1977)
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer authored May 27, 2024
1 parent a036b2d commit 0cd304a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions kubernetes/KUBECTL_FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@ pp-hetzner01 4250m 35% 53130Mi 82%
```shell
kubectl get pods -o "custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,MEMORY_REQUESTS:.spec.containers[*].resources.requests.memory,MEMORY_LIMITS:.spec.containers[*].resources.limits.memory,CPU_REQUESTS:.spec.containers[*].resources.requests.cpu,CPU_LIMITS:.spec.containers[*].resources.limits.cpu" -A | sort
```

## Get a secret

If you want to get a secret (e.g. for debugging), that is used in a pod like this:

```yaml
- name: KEYCLOAK_INGEST_PASSWORD
valueFrom:
secretKeyRef:
name: service-accounts
key: insdcIngestUserPassword
```
You can get the secret like this:
```shell
kubectl get secret service-accounts -o jsonpath="{.data.insdcIngestUserPassword}" | base64 --decode; echo
```

0 comments on commit 0cd304a

Please sign in to comment.