modified: README.md
This commit is contained in:
1 parent
f9f8a45a06
commit
d71c02a3c4
1 file changed
+30
-1
@@ -30,6 +30,8 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
|||||||
- [persistent volume claims](#persistent-volume-claims)
|
- [persistent volume claims](#persistent-volume-claims)
|
||||||
- [Create an pod with PVC](#create-an-pod-with-pvc)
|
- [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)
|
- [configMap](#configmap)
|
||||||
- [Secrets](#secrets)
|
- [Secrets](#secrets)
|
||||||
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
||||||
@@ -576,7 +578,11 @@ spec:
|
|||||||
claimName: data-pvc
|
claimName: data-pvc
|
||||||
```
|
```
|
||||||
|
|
||||||
### Services Accounts
|
## Services Accounts
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
kubectl -n headlamp create serviceaccount $ACCOUNT_NAME
|
||||||
|
```
|
||||||
|
|
||||||
**List all:**
|
**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}'
|
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
|
## configMap
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in new issue
Block a user