K8S 操作測試

不会游泳的鱼丶發表於2024-06-26

三萬字無坑搭建基於Docker+K8S+GitLab/SVN+Jenkins+Harbor持續整合交付環境 | 夜法之書 (17lai.site)

部落格需要更改的地方

unable to recognize "ingress-nginx-mandatory.yaml": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1"

unable to recognize "ingress-nginx-mandatory.yaml": no matches for kind "Role" in version "rbac.authorization.k8s.io/v1beta1"

unable to recognize "ingress-nginx-mandatory.yaml": no matches for kind "RoleBinding" in version "rbac.authorization.k8s.io/v1beta1"

unable to recognize "ingress-nginx-mandatory.yaml": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"

apiVersion: rbac.authorization.k8s.io/v1beta1 需要改為 
apiVersion: rbac.authorization.k8s.io/v1

kubectl apply -f ingress-nginx-mandatory.yaml

在k8s中執行kafka - SRE回憶錄 - 雲野生SRE回憶錄 (xadocker.cn)

clusterrolebinding.rbac.authorization.k8s.io/nginx-ingress-clusterrole-nisa-binding created
deployment.apps/nginx-ingress-controller unchanged
error: unable to recognize "ingress-nginx-mandatory.yaml": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1"

需要調整 local-path-storage.yaml

image: rancher/local-path-provisioner:master-head

image: registry.cn-shanghai.aliyuncs.com/niu_k8s/local-path-provisioner:master-head

檢視容器日誌命令


kubectl logs -n <namespace> <pod-name> nginx-ingress-controller

相關文章