kubectl/pkg/cmd/expose
Masashi Honma 3c3bc4f5e8 Namespace has no effect when exposing deployment with --dry-run=client
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
2020-12-24 09:40:10 +09:00
..
expose.go Namespace has no effect when exposing deployment with --dry-run=client 2020-12-24 09:40:10 +09:00
expose_test.go Namespace has no effect when exposing deployment with --dry-run=client 2020-12-24 09:40:10 +09:00