# ==============================
# Nginx Deployment + Service
# ==============================
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-nginx
  template:
    metadata:
      labels:
        app: my-nginx
    spec:
      containers:
        - name: my-nginx
          image: nginxdemos/hello
          resources:
            limits:
              memory: "128Mi"
              cpu: "500m"
            requests:
              memory: 64Mi
              cpu: 20m
          ports:
            - containerPort: 80
              name: httpp

---
apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  namespace: default
spec:
  selector:
    app: my-nginx
  ports:
    - port: 8081
      targetPort: httpp
