modified: README.md
This commit is contained in:
1 parent
f9f8a45a06
commit
d71c02a3c4
1 file changed
+31
-2
@@ -29,7 +29,9 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
||||
- [check orphans](#check-orphans)
|
||||
- [persistent volume claims](#persistent-volume-claims)
|
||||
- [Create an pod with PVC](#create-an-pod-with-pvc)
|
||||
- [Services Accounts](#services-accounts)
|
||||
- [Services Accounts](#services-accounts)
|
||||
- [Tokens](#tokens)
|
||||
- [cluster role binding](#cluster-role-binding)
|
||||
- [configMap](#configmap)
|
||||
- [Secrets](#secrets)
|
||||
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
||||
@@ -576,7 +578,11 @@ spec:
|
||||
claimName: data-pvc
|
||||
```
|
||||
|
||||
### Services Accounts
|
||||
## Services Accounts
|
||||
|
||||
``` bash
|
||||
kubectl -n headlamp create serviceaccount $ACCOUNT_NAME
|
||||
```
|
||||
|
||||
**List all:**
|
||||
|
||||
@@ -600,6 +606,29 @@ kubectl get secret <secret_name> -o jsonpath='{.data.token}' | base64 -d > ./ser
|
||||
kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}'
|
||||
```
|
||||
|
||||
## Tokens
|
||||
|
||||
``` bash
|
||||
kubectl create token $SERVICE_ACCOUNT_NAME -n $NS
|
||||
```
|
||||
|
||||
``` yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: name
|
||||
namespace: ns
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: "service-account-name"
|
||||
type: kubernetes.io/service-account-token
|
||||
```
|
||||
|
||||
## cluster role binding
|
||||
|
||||
``` bash
|
||||
kubectl create clusterrolebinding $NAME --serviceaccount=$NS:$SERVICE_ACCOUNT
|
||||
```
|
||||
|
||||
## configMap
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in new issue
Block a user