apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-app2
  labels: 
    app: nginx
spec:
  # 副本数
  replicas: 3 
  selector: 
    matchLabels:
      app: nginx 
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx-containers
        image: nginx:latest
        imagePullPolicy: IfNotPresent
        ports:
        - name: nginxport
          containerPort: 80

