【k8s 创建只能管理特定命名空间资源的 kubeconfig】教程文章相关的互联网学习教程文章

k8s 创建只能管理特定命名空间资源的 kubeconfig【代码】

目标创建新命名空间 tommy创建只能管理 tommy 命名空间下资源的 kubeconfig步骤创建密钥openssl genrsa -out tommy.key 2048 为密钥创建证书签名申请(CSR)openssl req -new -key tommy.key -out tommy.csr -subj "/CN=tommy/O=student" # 用户名:tommy # 组:student 将证书签名申请提交到 k8skubectl apply -f - <<EOF apiVersion: certificates.k8s.io/v1 kind: CertificateSigningRequest metadata:name: tommy spec:groups:...

k8s删除Terminating状态的命名空间【代码】

一、概述 最近部署kubesphere时,使用kubectl delete -f xxx.yaml,再次执行 kubectl apply -f xxx.yaml,提示: Error from server (Forbidden): error when creating "kubesphere-complete-setup.yaml": configmaps "ks-installer" is forbidden: unable to create new content in namespace kubesphere-system because it is being terminated Error from server (Forbidden): error when creating "kubesphere-complete-setup...