-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubectl "--dry-run" with "-o yaml" does not show 'apiVersion' neither 'kind' #384
Comments
Can you tell what I tried both for:
and
and it gives me the correct output. $ kubectl create namespace my-namespace -o yaml --dry-run
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: my-namespace
spec: {}
status: {} |
fresh install on centos 7.4:
|
I too had this problem with:
|
Having same issue with Version 1.10.0 - This is breaking a lot of our build jobs... 👎 |
You can work around it by injecting:
I ran into this with Istio's installation script for auto injecting the side car. It was one location in one script, so this type of work around didn't hurt too badly. |
If you look at the version of 1.10 @nikhita is running she's on a beta release of 1.10.1 -- so perhaps there's a fix already coming. Those of us affected are using the current stable release of 1.10.0. |
still have issue with 1.10.1 beta:
|
This was fixed in kubernetes/kubernetes#61808. This patch was cherry-picked into The latest 1.10 tag is (Also, it worked for me above because I was on the |
Just confirmed with sig-release, 1.10.1 should be out mid next week. |
That’s clear thanks |
Closing this since the fix has been merged on master and cherry-picked. /close |
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Kubernetes version (use
kubectl version
): 1.10.0Environment:
uname -a
): 3.10.0-693.17.1.el7.x86_64What happened:
the output of
kubectl create namespace my-namespace -o yaml --dry-run
does not show 'apiVersion' neither 'kind' as previous versions.kubectl create namespace my-namespace -o yaml --dry-run
Output:
metadata:
creationTimestamp: null
name: my-namespace
spec: {}
status: {}
What you expected to happen:
expected the output of previous versions, like:
$ kubectl create namespace my-namespace -o yaml --dry-run
Output:
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: my-namespace
spec: {}
status: {}
I use the "--dry-run" and "-o yaml" to execute
kubectl create namespace my-namespace -o yaml --dry-run | kubectl apply -f -
The text was updated successfully, but these errors were encountered: