How to create secrets using Kubernetes Python client?

后端 未结 1 1973
野的像风
野的像风 2021-01-20 14:27

I have been trying to play around with creating secrets for Kubernetes cluster using the python client. I keep getting an error that says

Traceback (most rec         


        
1条回答
  •  囚心锁ツ
    2021-01-20 15:17

    Almost everything that you have written is alright but pay attention to the message received from kube-apiserver:

    HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"none in version \"v1\" cannot be handled as a Secret: no kind \"none\" is registered for version \"v1\"","reason":"BadRequest","code":400}

    Especially no kind "none". Is it just typo are did you have something on your mind here?

    You have list of kinds here https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#types-kinds

    If you change kind to "Secret" then everything will be working fine.

    0 讨论(0)
提交回复
热议问题