Skip to content Skip to sidebar Skip to footer

How To Create Secrets Using Kubernetes Python Client?

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 recent call last): File 'c

Solution 1:

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 or do 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.

Post a Comment for "How To Create Secrets Using Kubernetes Python Client?"