-
Notifications
You must be signed in to change notification settings - Fork 2
/
nsx-demo-app.yml
66 lines (66 loc) · 1.2 KB
/
nsx-demo-app.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
# This creates the Replication Controller for the Web-Server
apiVersion: v1
kind: ReplicationController
metadata:
name: nsx-demo-rc
labels:
app: nsx-demo
spec:
replicas: 4
template:
metadata:
labels:
app: nsx-demo
secgroup: web-tier
spec:
containers:
- name: nsx-demo
image: yfauser/nsx-demo
ports:
- containerPort: 80
---
# This creates a 'jumhost' Pod to test the K8s Service
apiVersion: v1
kind: Pod
metadata:
name: mgmtpod
spec:
containers:
- name: ubuntu
image: tutum/ubuntu:trusty
imagePullPolicy: IfNotPresent
ports:
- name: ssh
containerPort: 22
env:
- name: ROOT_PASS
value: VMware1!
---
# This creates the K8s Service
apiVersion: v1
kind: Service
metadata:
name: nsx-demo
labels:
app: nsx-demo
spec:
ports:
# the port that this service should serve on
- port: 80
selector:
app: nsx-demo
---
# This creates the K8s Ingress Controller
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nsx-demo-ingress
spec:
rules:
- host: nsx.demo.yves.local
http:
paths:
- path: /
backend:
serviceName: nsx-demo
servicePort: 80