
把页面生成的 secret 配置清单 yaml 文件贴到终端 apply,报错如下:
error: error validating "default.yaml": error validating data: [ValidationError(Secret.data..dockerconfigjson): invalid type for io.k8s.api.core.v1.Secret.data: got "map", expected "string", ValidationError(Secret): unknown field "spec" in io.k8s.api.core.v1.Secret]; if you choose to ignore these errors, turn validation off with --validate=false
界面生成的配置清单文件:
apiVersion: v1
kind: Secret
metadata:
namespace: open-api
labels: &ref_0
app: registry-secret
name: registry-secret
annotations:
kubesphere.io/alias-name: image repo
kubesphere.io/description: 内部镜像仓库
type: kubernetes.io/dockerconfigjson
spec:
template:
metadata:
labels: *ref_0
data:
.dockerconfigjson:
password: roward*9)
username: infrabuild
url: xxx.xxx.xxx
email: xxxi@xxx.com