You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
1.6 KiB

apiVersion: v1
kind: Service
metadata:
name: wpcitas
namespace: wpcitas
labels:
app: wpcitas
spec:
type: NodePort
ports:
- port: 80
nodePort: 30440
targetPort: wpcitas
selector:
app: wpcitas
tier: frontend
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: citas-pv-claim
namespace: wpcitas
labels:
app: wpcitas
spec:
accessModes:
- ReadWriteOnce
storageClassName: ""
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wpcitas
namespace: wpcitas
labels:
app: wpcitas
spec:
selector:
matchLabels:
app: wpcitas
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: wpcitas
tier: frontend
spec:
containers:
- image: docker-registry:32000/wordpress:1.0
name: wpcitas
env:
- name: WORDPRESS_DB_HOST
value: wpcitas-mysql
- name: WORDPRESS_DB_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlcitas-pass
key: password
- name: WORDPRESS_DB_USER
valueFrom:
secretKeyRef:
name: mysqlcitas-pass
key: db_user
ports:
- containerPort: 80
name: wpcitas
volumeMounts:
- name: wpcitas-persistent-storage
mountPath: /var/www/html
imagePullSecrets:
- name: reg-cred-secret
volumes:
- name: wpcitas-persistent-storage
persistentVolumeClaim:
claimName: citas-pv-claim