Skip to content
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

API call to submit a deployment gets back HTTP 422 (Unprocessable Entity) error #48

Closed
firazs opened this issue Nov 7, 2017 · 6 comments · Fixed by #57
Closed

API call to submit a deployment gets back HTTP 422 (Unprocessable Entity) error #48

firazs opened this issue Nov 7, 2017 · 6 comments · Fixed by #57

Comments

@firazs
Copy link

firazs commented Nov 7, 2017

I am getting an HTTP 422 (Unprocessable Entity) error for an API call I am making to submit a deployment (json attached, submitting the same json through kubectl works fine), the API call is
k8sClient.CreateNamespacedDeploymentWithHttpMessagesAsync

The only relevant line in the APIServer logs is the following:
I1104 00:08:00.847824 1 wrap.go:42] POST /apis/apps/v1beta1/namespaces/default/deployments?pretty=true: (45.627034ms) 422 [[FxVersion/4.7.2114.0 OSName/WindowsServer2012R2Datacenter OSVersion/6.3.9600 k8s.Kubernetes/0.0.0.0] 167.220.1.198:34012]

deployment-gateway.json.txt

@brendandburns
Copy link
Contributor

Can you add the body of the Deployment that you sent?

Thanks!

@brendandburns
Copy link
Contributor

fwiw, side conversation indicates that this is because we don't handle IntOrString correctly...

@firazs
Copy link
Author

firazs commented Nov 7, 2017

Attached to original comment

@tg123
Copy link
Member

tg123 commented Nov 16, 2017

seems need a hack to autorest, I am trying to give a solution.

@brendandburns
Copy link
Contributor

@tg123 see: kubernetes-client/gen#30

You may be able to do something similar for C#

@tg123
Copy link
Member

tg123 commented Nov 16, 2017

@brendandburns thanks
seems autorest template does not support add user defined jsonconverters, I am searching for workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants