---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dep-httpd
spec:
  replicas: 2 
  selector:
    matchLabels:
      component: httpd_pod
  template:
    metadata:
      labels:
        component: httpd_pod
    spec: 
      containers:
        - name: cntr-httpd
          image: httpd:latest
          ports:
            - containerPort: 80
          command: ["/bin/bash", "-c"]
          args:
            - |
              /bin/echo "You've hit httpd, $HOSTNAME" > /usr/local/apache2/htdocs/index.html
              /usr/local/bin/httpd-foreground  