错误:无法创建机密服务器找不到请求的资源(发布机密)



创建机密时:

kubectl -n customspace create secret tls localhost.customspace.svc.customspace-tls-pair --cert=certs/webhook.crt --key=certs/webhook.key

我得到错误:

error: failed to create secret the server could not find the requested resource (post secrets)

我已经检查过了https://kubernetes.io/releases/version-skew-policy/但我还是犯了这个错误。

$ kubectl version -o=yaml                                                                                                                   
clientVersion:
buildDate: "2022-09-14T19:49:27Z"
compiler: gc
gitCommit: e4d4e1ab7cf1bf15273ef97303551b279f0920a9
gitTreeState: clean
gitVersion: v1.25.1
goVersion: go1.19.1
major: "1"
minor: "25"
platform: linux/amd64
kustomizeVersion: v4.5.7
serverVersion:
buildDate: "2022-07-13T14:23:26Z"
compiler: gc
gitCommit: aef86a93758dc3cb2c658dd9657ab4ad4afc21cb
gitTreeState: clean
gitVersion: v1.24.3
goVersion: go1.18.3
major: "1"
minor: "24"
platform: linux/amd64
$ echo $KUBECONFIG
/home/vyom/.kube/config

任何帮助都会非常感激,看了很多类似的问题,没有运气。

这可能意味着您的命名空间(customspace(不存在。

相关内容

最新更新