--- apiVersion: v1 kind: Service metadata: name: {self.path.k8s} spec: selector: backend: {self.path.k8s} ports: - name: http protocol: TCP port: 80 targetPort: http --- apiVersion: apps/v1 kind: Deployment metadata: name: {self.path.k8s} spec: replicas: 1 selector: matchLabels: backend: {self.path.k8s} template: metadata: labels: backend: {self.path.k8s} spec: containers: - name: httpbin image: docker.io/kennethreitz/httpbin ports: - name: http containerPort: 80