apiVersion: apps/v1
kind: Deployment
metadata:
  name: site2
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: site2
      server: httpd
  template:
    metadata:
      name: site2
      labels:
        app: site2
        server: httpd
    spec:
      containers:
      - name: site2
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["/bin/sh", "-c", "echo 'welcome to site2' > /var/www/index.html; httpd -f -p 8080 -h /var/www"]
        ports:
        - name: http
          containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: site2
spec:
  selector:
    app: site2
  ports:
  - name: http
    port: 8080
    targetPort: 8080
    protocol: TCP
