How to create secrets using Kubernetes Python client? How to create secrets using Kubernetes Python client? kubernetes kubernetes

How to create secrets using Kubernetes Python client?


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.