mirror of
https://github.com/Dannecron/netology-devops.git
synced 2025-12-25 23:32:37 +03:00
homework 12.2: complete rest tasks
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hello-node-deployment
|
||||
labels:
|
||||
app: hello-node
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hello-node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: hello-node
|
||||
spec:
|
||||
containers:
|
||||
- name: hello-node
|
||||
image: k8s.gcr.io/echoserver:1.4
|
||||
9
src/homework/12-kubernetes/12.2/config/role.yml
Normal file
9
src/homework/12-kubernetes/12.2/config/role.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: readonlyrole
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
12
src/homework/12-kubernetes/12.2/config/rolebinding.yml
Normal file
12
src/homework/12-kubernetes/12.2/config/rolebinding.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: readonlybinding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: readonlyuser
|
||||
namespace: default
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: readonlyrole
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: oke-kubeconfig-sa-token
|
||||
namespace: default
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: readonlyuser
|
||||
type: kubernetes.io/service-account-token
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: readonlyuser
|
||||
automountServiceAccountToken: false
|
||||
Reference in New Issue
Block a user