first yaml for lab2
This commit is contained in:
parent
75d37cf0aa
commit
4606ae6563
5 changed files with 84 additions and 0 deletions
7
02_wordpress/yaml/01_namespace.yaml
Normal file
7
02_wordpress/yaml/01_namespace.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: lab2
|
||||
|
||||
# vim: set ts=2 sw=2 et:
|
22
02_wordpress/yaml/02_deployment.yaml
Normal file
22
02_wordpress/yaml/02_deployment.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: wordpress
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: wordpress
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: wordpress
|
||||
spec:
|
||||
containers:
|
||||
- name: wordpress
|
||||
image: wordpress:5
|
||||
ports:
|
||||
- containerPort: 80
|
||||
|
||||
# vim: set ts=2 sw=2 et:
|
15
02_wordpress/yaml/03_service.yaml
Normal file
15
02_wordpress/yaml/03_service.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: wordpress
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: wordpress
|
||||
type: ClusterIP
|
||||
|
||||
# vim: set ts=2 sw=2 et:
|
25
02_wordpress/yaml/04_deployment.yaml
Normal file
25
02_wordpress/yaml/04_deployment.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mariadb:10
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: securepassword
|
||||
|
||||
# vim: set ts=2 sw=2 et:
|
15
02_wordpress/yaml/05_service.yaml
Normal file
15
02_wordpress/yaml/05_service.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
ports:
|
||||
- port: 3306
|
||||
protocol: TCP
|
||||
targetPort: 3306
|
||||
selector:
|
||||
app: mysql
|
||||
type: ClusterIP
|
||||
|
||||
# vim: set ts=2 sw=2 et:
|
Loading…
Reference in a new issue