mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 18:27:36 +00:00
misc: doc improvements
This commit is contained in:
@@ -73,7 +73,8 @@ This feature is ideal for scenarios where you need to:
|
|||||||
|
|
||||||
Choose your authentication method:
|
Choose your authentication method:
|
||||||
|
|
||||||
#### Option 1: Token (API) Authentication
|
<AccordionGroup>
|
||||||
|
<Accordion title="Token (API) Authentication">
|
||||||
This method uses a service account token to authenticate with the Kubernetes cluster. It's suitable when:
|
This method uses a service account token to authenticate with the Kubernetes cluster. It's suitable when:
|
||||||
- You want to use a specific service account token that you've created
|
- You want to use a specific service account token that you've created
|
||||||
- You're working with a public cluster or have network access to the cluster's API server
|
- You're working with a public cluster or have network access to the cluster's API server
|
||||||
@@ -147,8 +148,8 @@ This feature is ideal for scenarios where you need to:
|
|||||||
kubectl patch serviceaccount infisical-token-requester -p '{"secrets": [{"name": "infisical-token-requester-token"}]}' -n default
|
kubectl patch serviceaccount infisical-token-requester -p '{"secrets": [{"name": "infisical-token-requester-token"}]}' -n default
|
||||||
kubectl get secret infisical-token-requester-token -n default -o=jsonpath='{.data.token}' | base64 --decode
|
kubectl get secret infisical-token-requester-token -n default -o=jsonpath='{.data.token}' | base64 --decode
|
||||||
```
|
```
|
||||||
|
</Accordion>
|
||||||
#### Option 2: Gateway Authentication
|
<Accordion title="Gateway Authentication">
|
||||||
This method uses an Infisical Gateway deployed in your Kubernetes cluster. It's ideal when:
|
This method uses an Infisical Gateway deployed in your Kubernetes cluster. It's ideal when:
|
||||||
- You want to avoid storing static service account tokens
|
- You want to avoid storing static service account tokens
|
||||||
- You prefer to use the Gateway's pre-configured service account
|
- You prefer to use the Gateway's pre-configured service account
|
||||||
@@ -194,6 +195,8 @@ This feature is ideal for scenarios where you need to:
|
|||||||
```bash
|
```bash
|
||||||
kubectl apply -f rbac.yaml
|
kubectl apply -f rbac.yaml
|
||||||
```
|
```
|
||||||
|
</Accordion>
|
||||||
|
</AccordionGroup>
|
||||||
|
|
||||||
</Tab>
|
</Tab>
|
||||||
|
|
||||||
@@ -214,7 +217,8 @@ This feature is ideal for scenarios where you need to:
|
|||||||
|
|
||||||
Choose your authentication method:
|
Choose your authentication method:
|
||||||
|
|
||||||
#### Option 1: Token (API) Authentication
|
<AccordionGroup>
|
||||||
|
<Accordion title="Token (API) Authentication">
|
||||||
This method uses a service account token to authenticate with the Kubernetes cluster. It's suitable when:
|
This method uses a service account token to authenticate with the Kubernetes cluster. It's suitable when:
|
||||||
- You want to use a specific service account token that you've created
|
- You want to use a specific service account token that you've created
|
||||||
- You're working with a public cluster or have network access to the cluster's API server
|
- You're working with a public cluster or have network access to the cluster's API server
|
||||||
@@ -300,8 +304,8 @@ This feature is ideal for scenarios where you need to:
|
|||||||
```bash
|
```bash
|
||||||
kubectl apply -f rbac.yaml
|
kubectl apply -f rbac.yaml
|
||||||
```
|
```
|
||||||
|
</Accordion>
|
||||||
#### Option 2: Gateway Authentication
|
<Accordion title="Gateway Authentication">
|
||||||
This method uses an Infisical Gateway deployed in your Kubernetes cluster. It's ideal when:
|
This method uses an Infisical Gateway deployed in your Kubernetes cluster. It's ideal when:
|
||||||
- You want to avoid storing static service account tokens
|
- You want to avoid storing static service account tokens
|
||||||
- You prefer to use the Gateway's pre-configured service account
|
- You prefer to use the Gateway's pre-configured service account
|
||||||
@@ -368,47 +372,8 @@ This feature is ideal for scenarios where you need to:
|
|||||||
```bash
|
```bash
|
||||||
kubectl apply -f rbac.yaml
|
kubectl apply -f rbac.yaml
|
||||||
```
|
```
|
||||||
|
</Accordion>
|
||||||
### Example Role Configuration
|
</AccordionGroup>
|
||||||
|
|
||||||
Here's an example of a role that can be assigned to dynamically created service accounts:
|
|
||||||
|
|
||||||
```yaml test-role.yaml
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: infisical-dynamic-role
|
|
||||||
rules:
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources:
|
|
||||||
- "pods"
|
|
||||||
- "configmaps"
|
|
||||||
- "secrets"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
- "watch"
|
|
||||||
- apiGroups: ["apps"]
|
|
||||||
resources:
|
|
||||||
- "deployments"
|
|
||||||
- "statefulsets"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
- "watch"
|
|
||||||
- apiGroups: ["batch"]
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "cronjobs"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
- "watch"
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl apply -f test-role.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
<Note>
|
<Note>
|
||||||
In Kubernetes RBAC, a service account can only create role bindings for resources that it has access to.
|
In Kubernetes RBAC, a service account can only create role bindings for resources that it has access to.
|
||||||
|
|||||||
Reference in New Issue
Block a user