apiVersion: v1 kind: Service metadata: name: nginx2 spec: ports: - port: 80 targetPort: 80 selector: app: nginx2