Compare commits
No commits in common. "e103078eabcd288c1fa82962ddb82890190d7536" and "d564c2350f781fb9d02c42e4b11b109d20649eb2" have entirely different histories.
e103078eab
...
d564c2350f
@ -199,7 +199,7 @@ kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
|
||||
|
||||
#### Kubernetes Dashboard
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.3.1/aio/deploy/recommended.yaml
|
||||
```
|
||||
- Proxy for kubernetes dashboard
|
||||
```shell
|
||||
|
@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: mysql
|
||||
---
|
||||
apiVersion: mysql.oracle.com/v2alpha1
|
||||
kind: InnoDBCluster
|
||||
metadata:
|
||||
name: mysql-cluster
|
||||
namespace: mysql
|
||||
spec:
|
||||
secretName: mysql-secret
|
||||
instances: 3
|
||||
router:
|
||||
instances: 1
|
1
rbac/.gitignore
vendored
1
rbac/.gitignore
vendored
@ -1 +0,0 @@
|
||||
developer-user.yaml
|
@ -1,74 +0,0 @@
|
||||
# Create RBAC for specific namespace
|
||||
|
||||
- Apply RBAC for specific namespace
|
||||
|
||||
```shell
|
||||
k apply -f access.yaml
|
||||
```
|
||||
|
||||
- Get Details of RBAC
|
||||
|
||||
```shell
|
||||
k describe sa developer -n developer-dev
|
||||
```
|
||||
|
||||
- Get Token from RBAC
|
||||
|
||||
```shell
|
||||
k get secret developer-token-l4r67 -n developer-dev -o "jsonpath={.data.token}" | base64 -d
|
||||
```
|
||||
|
||||
- Get Certificate from RBAC
|
||||
|
||||
```shell
|
||||
k get secret developer-token-l4r67 -n developer-dev -o "jsonpath={.data['ca\.crt']}"
|
||||
```
|
||||
|
||||
- Create kube config file
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Config
|
||||
preferences: {}
|
||||
cluster:
|
||||
certificate-authority-data: PLACE CERTIFICATE HERE
|
||||
server: https://YOUR_KUBERNETES_API_ENDPOINT
|
||||
name: developer-cluster
|
||||
|
||||
users:
|
||||
- name: developer
|
||||
user:
|
||||
as-user-extra: {}
|
||||
client-key-data: PLACE CERTIFICATE HERE
|
||||
token: PLACE USER TOKEN HERE
|
||||
|
||||
contexts:
|
||||
- context:
|
||||
cluster: kubernetes
|
||||
namespace: developer-dev
|
||||
user: developer
|
||||
name: developer-dev
|
||||
|
||||
current-context: developer-dev
|
||||
clusters:
|
||||
- cluster:
|
||||
certificate-authority-data: PLACE CERTIFICATE HERE
|
||||
server: https://YOUR_KUBERNETES_API_ENDPOINT
|
||||
name: developer-cluster
|
||||
|
||||
users:
|
||||
- name: developer
|
||||
user:
|
||||
as-user-extra: {}
|
||||
client-key-data: PLACE CERTIFICATE HERE
|
||||
token: PLACE USER TOKEN HERE
|
||||
|
||||
contexts:
|
||||
- context:
|
||||
cluster: kubernetes
|
||||
namespace: developer-dev
|
||||
user: developer
|
||||
name: developer-dev
|
||||
|
||||
current-context: developer-dev
|
||||
```
|
@ -1,43 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
app: developer-dev
|
||||
name: developer-dev
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: developer
|
||||
namespace: developer-dev
|
||||
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: developer-full-access
|
||||
namespace: developer-dev
|
||||
rules:
|
||||
- apiGroups: ["", "extensions", "apps"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["batch"]
|
||||
resources:
|
||||
- jobs
|
||||
- cronjobs
|
||||
verbs: ["*"]
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: developer-view
|
||||
namespace: developer-dev
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: developer
|
||||
namespace: developer-dev
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: developer-full-access
|
Loading…
Reference in New Issue
Block a user