This is how to reproduce. $ kubectl create ns testns $ kubectl -n testns create deployment test-deploy --image=nginx $ kubectl -n testns expose deployment.apps/test-deploy --port=80 --dry-run=client -o yaml apiVersion: v1 kind: Service metadata: creationTimestamp: null labels: app: test-deploy name: test-deploy spec: ports: - port: 80 protocol: TCP targetPort: 80 selector: app: test-deploy status: loadBalancer: {} If --dry-run=client is not specified, namespace element is contained in the yaml. Kubernetes-commit: 8d83dfe2075be68344a633418de7ef81e1dd5957 |
||
---|---|---|
.. | ||
expose.go | ||
expose_test.go |