add missing yaml files for lab1

This commit is contained in:
Cedric Girard 2020-01-08 10:14:17 +01:00
parent 26b06ad1ec
commit 75d37cf0aa
3 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: ClusterIP
# vim: set ts=2 sw=2 et:

View file

@ -0,0 +1,11 @@
---
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-webpage
data:
index.html: |
<body>
<h1>Hello World !</h1>
</body>
# vim: set ts=2 sw=2 et:

View file

@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
volumeMounts:
- name: webpage
mountPath: /usr/share/nginx/html
volumes:
- name: webpage
configMap:
name: nginx-webpage
# vim: set ts=2 sw=2 et: