Skip to content

Instantly share code, notes, and snippets.

@olegsu
Created September 7, 2020 10:23
Show Gist options
  • Save olegsu/17a773687c8acaf2f74cb0811bee6b53 to your computer and use it in GitHub Desktop.
Save olegsu/17a773687c8acaf2f74cb0811bee6b53 to your computer and use it in GitHub Desktop.
Create Pod To Demo CSI-Secret-Store
#!/bin/bash
cat <<EOF | kubectl apply -n $NS -f -
kind: Pod
apiVersion: v1
metadata:
name: nginx-secrets-store-inline
spec:
containers:
- image: nginx
name: nginx
volumeMounts:
- name: secrets-store-inline
mountPath: "/mnt/secrets-store"
readOnly: true
volumes:
- name: secrets-store-inline
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: "azure-csi"
nodePublishSecretRef:
name: secrets-store-creds
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment