-
Notifications
You must be signed in to change notification settings - Fork 10
/
deployment.yaml
63 lines (63 loc) · 1.15 KB
/
deployment.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: bash-ingress
labels:
app: bash-ingress
spec:
selector:
matchLabels:
app: bash-ingress
template:
metadata:
labels:
app: bash-ingress
spec:
serviceAccountName: bash-ingress
containers:
- name: c1
image: learnk8s/bash-ingress:1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: bash-ingress
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: bash-ingress
rules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "watch", "list"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: bash-ingress
subjects:
- kind: ServiceAccount
name: bash-ingress
roleRef:
kind: Role
name: bash-ingress
---
apiVersion: v1
kind: Service
metadata:
name: bash-ingress
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 32000
selector:
app: bash-ingress