Skip to content

Commit

Permalink
Merge pull request containers#17866 from ygalblum/doc-kube-secret
Browse files Browse the repository at this point in the history
[CI:DOCS] Kube Play Doc: Document the support for K8S Secret
  • Loading branch information
openshift-merge-robot authored Apr 1, 2023
2 parents 8a92f9d + dd8ee49 commit 9144b75
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/source/markdown/podman-kube-play.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Currently, the supported Kubernetes kinds are:
- Deployment
- PersistentVolumeClaim
- ConfigMap
- Secret

`Kubernetes Pods or Deployments`

Expand Down Expand Up @@ -122,6 +123,40 @@ spec:

and as a result environment variable `FOO` will be set to `bar` for container `container-1`.

`Kubernetes Secret`

Kubernetes Secret represents a Podman named secret. The Kubernetes Secret is saved as a whole and may be referred to as a source of environment variables or volumes in Pods or Deployments.

For example, the following YAML document defines a Secret and then uses it in a Pod:

```
kind: Secret
apiVersion: v1
metadata:
name: foo
data:
foo: YmFy # base64 for bar
---
apiVersion: v1
kind: Pod
metadata:
name: foobar
spec:
containers:
- command:
- top
name: container-1
image: foobar
env:
- name: FOO
valueFrom:
secretKeyRef:
name: foo
key: foo
```

and as a result environment variable `FOO` will be set to `bar` for container `container-1`.

## OPTIONS

@@option annotation.container
Expand Down

0 comments on commit 9144b75

Please sign in to comment.