You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

创建Kubernetes Secret时出现资源找不到错误的求助

创建TLS类型Secret时出现资源找不到错误

执行以下命令创建TLS Secret:

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)

已查阅Kubernetes版本偏差策略文档,问题仍未解决。

当前kubectl版本信息:

$ 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

KUBECONFIG环境变量值:

$ echo $KUBECONFIG
/home/vyom/.kube/config

已查阅诸多同类问题但未找到解决方案,恳请各位提供帮助。


内容的提问来源于stack exchange,提问作者BeastMaster64

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 10:01:08