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: registry.cn-beijing.aliyuncs.com/wangxiaochun/wordpress:php8.2-apache
        env:
        - name: TZ
          value: Asia/Shanghai
        - name: WORDPRESS_DB_HOST 
          value: mysql-svc                     #指向mysql的SVC的名称
        - name: WORDPRESS_DB_NAME 
          value: wordpress
        - name: WORDPRESS_DB_USER 
          value: wpuser
        - name: WORDPRESS_DB_PASSWORD 
          value: "123456"
