apiVersion: v1 kind: Service metadata: annotations: labels: app: elastic name: elastic spec: ports: - name: "9200" port: 9200 targetPort: 9200 selector: app: elastic