apiVersion: v1 kind: Service metadata: name: frontend-nlb annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" spec: selector: app: hello tier: frontend-nlb ports: - protocol: "TCP" port: 80 targetPort: 80 type: LoadBalancer --- apiVersion: apps/v1 kind: Deployment metadata: name: frontend-nlb spec: selector: matchLabels: app: hello tier: frontend-nlb track: stable replicas: 1 template: metadata: labels: app: hello tier: frontend track: stable spec: containers: - name: nginx image: "gcr.io/google-samples/hello-frontend:1.0" lifecycle: preStop: exec: command: ["/usr/sbin/nginx","-s","quit"]