Last active
April 28, 2025 23:42
-
-
Save todd-dsm/07403cc10aae030cf9a496215d9d538d to your computer and use it in GitHub Desktop.
Launch webapp to test HashiCorp Vault config simple-vault-client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Deploy webapp to test the demo namespace | |
| # REF: https://bit.ly/3EKx0cT | |
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: demo | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: webapp | |
| namespace: demo | |
| labels: | |
| app: webapp | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: webapp | |
| template: | |
| metadata: | |
| labels: | |
| app: webapp | |
| spec: | |
| serviceAccountName: vault-auth | |
| containers: | |
| - name: webapp | |
| image: hashieducation/simple-vault-client:latest | |
| imagePullPolicy: Always | |
| env: | |
| - name: VAULT_ADDR | |
| value: 'http://vault.vault.svc:8200' | |
| - name: JWT_PATH | |
| value: '/var/run/secrets/kubernetes.io/serviceaccount/token' | |
| - name: SERVICE_PORT | |
| value: '8080' | |
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: webapp | |
| namespace: demo | |
| annotations: | |
| vault.hashicorp.com/alias-metadata-env: demo/webapp | |
| vault.hashicorp.com/alias-metadata-namespace: demo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment