-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.yml
70 lines (69 loc) · 1.48 KB
/
main.yml
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
66
67
68
69
70
- name: Create project for global workshop content
k8s:
api_version: v1
kind: Namespace
name: "{{ meta.name }}"
- name: Create a Service object from an inline definition
k8s:
state: present
definition:
apiVersion: v1
kind: Service
metadata:
name: apache
namespace: "{{ meta.name }}"
labels:
app: apache
service: apache
spec:
selector:
app: apache
ports:
- name: "8080"
port: 8080
protocol: TCP
targetPort: 8080
type: ClusterIP
- name: Create route object
k8s:
state: present
definition:
apiVersion: v1
kind: Route
metadata:
labels:
app: apache
name: apache
namespace: "{{ meta.name }}"
spec:
port:
targetPort: 8080
to:
kind: Service
name: apache
- name: Deploy a web server
k8s:
api_version: v1
namespace: "{{ meta.name }}"
definition:
kind: Deployment
metadata:
labels:
app: apache
name: apache
spec:
replicas: 1
selector:
matchLabels:
app: apache
template:
metadata:
labels:
app: apache
spec:
containers:
- name: apache
image: quay.io/anandpavithran/infosys:1.0
ports:
- containerPort: 8080
protocol: TCP