add missing yaml files for lab1
This commit is contained in:
parent
26b06ad1ec
commit
75d37cf0aa
3 changed files with 55 additions and 0 deletions
15
01_nginx/yaml/03_service.yaml
Normal file
15
01_nginx/yaml/03_service.yaml
Normal 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:
|
11
01_nginx/yaml/04_configmap.yaml
Normal file
11
01_nginx/yaml/04_configmap.yaml
Normal 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:
|
29
01_nginx/yaml/05_deployment.yaml
Normal file
29
01_nginx/yaml/05_deployment.yaml
Normal 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:
|
Loading…
Reference in a new issue