Service Accounts
1858 ワード
サービスアカウント数の確認
kubectl get serviceaccounts
controlplane ~ ➜ kubectl get serviceaccounts
NAME SECRETS AGE
default 1 5m2s
サービスアカウントの詳細の表示
controlplane ~ ➜ kubectl describe serviceaccounts
Name: default
Namespace: default
Labels: <none>
Annotations: <none>
Image pull secrets: <none>
Mountable secrets: default-token-4ps9v
Tokens: default-token-4ps9v
Events: <none>
サービスアカウントの作成
kubectl create serviceaccount dashboard-sa
サービスアカウントのバインドによる配置の作成
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-dashboard
namespace: default
spec:
replicas: 1
selector:
matchLabels:
name: web-dashboard
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
name: web-dashboard
spec:
serviceAccountName: dashboard-sa
containers:
- image: gcr.io/kodekloud/customimage/my-kubernetes-dashboard
imagePullPolicy: Always
name: web-dashboard
ports:
- containerPort: 8080
protocol: TCP
Reference
この問題について(Service Accounts), 我々は、より多くの情報をここで見つけました https://velog.io/@gadian88/Service-Accountsテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol