apiVersion: apps/v1
kind: Deployment
metadata:
  name: k8stb.webapp-deployment
spec:
  selector:
    matchLabels:
      app: k8stb.webapp
  replicas: 2
  template:
    metadata:
      labels:
        app: k8stb.webapp
    spec:
      containers:
      - name: k8stb-webapp
        image: changyuan/k8stb.webapp
        ports:
        - containerPort: 8080
        env:
        - name: DB_HOSTNAME
          value: "10.244.2.6"
        - name: MYSQL_ROOT_PASSWORD
          value: "password"
        - name: DB_PORT
          value: "3306"