--- apiVersion: v1 kind: Service metadata: name: nagios spec: ports: - name: http80 port: 80 selector: # apply service to any pod with label app: nginx app: nagios # EOF