-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk8s.yaml
More file actions
65 lines (65 loc) · 1.17 KB
/
k8s.yaml
File metadata and controls
65 lines (65 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
apiVersion: v1
kind: Service
metadata:
name: disco-pod
spec:
selector:
app: disco-pod
type: NodePort
ports:
- port: 3000
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: disco-pod
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["endpoints"]
verbs: ["get", "watch", "list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: disco-pod
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: disco-pod
namespace: default
roleRef:
kind: Role
name: disco-pod
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: disco-pod
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: disco-pod
spec:
replicas: 1
selector:
matchLabels:
app: disco-pod
template:
metadata:
labels:
app: disco-pod
spec:
serviceAccountName: disco-pod
containers:
- name: my-service
- name: disco-pod
image: disco-pod
imagePullPolicy: Never
tty: true
env:
- name: DEBUG
value: disco-pod*