Create projected-service-account-token.yaml

pull/46254/head
Sabbir Ahmed Shameem 2024-05-07 20:06:19 +06:00 committed by GitHub
parent 7514149994
commit b8636c43b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
apiVersion: v1
kind: Pod
metadata:
name: sa-token-test
spec:
containers:
- name: container-test
image: busybox:1.28
command: ["sleep", "3600"]
volumeMounts:
- name: token-vol
mountPath: "/service-account"
readOnly: true
serviceAccountName: default
volumes:
- name: token-vol
projected:
sources:
- serviceAccountToken:
audience: api
expirationSeconds: 3600
path: token