请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

根据跟新后的6-7又做了一遍nginx-ingress-controller还是重启几次后就CrashLoopBackOff了

根据跟新后的6-7又做了一遍,依然是执行 6-6-ingress-nginx-controller.yaml 这个yaml文件后还是发现pod一直在在试图重启。报错还是跟之前一样的:
E1214 12:22:35.857191 6 reflector.go:123] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:156: Failed to list *v1.Endpoints: endpoints is forbidden: User “system:serviceaccount:ingress-nginx:nginx-ingress-serviceaccount” cannot list resource “endpoints” in API group “” at the cluster scope
E1214 12:22:35.860909 6 reflector.go:123] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:155: Failed to list *v1.Secret: secrets is forbidden: User “system:serviceaccount:ingress-nginx:nginx-ingress-serviceaccount” cannot list resource “secrets” in API group “” at the cluster scope
E1214 12:22:35.862259 6 reflector.go:123] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:157: Failed to list *v1.Service: services is forbidden: User “system:serviceaccount:ingress-nginx:nginx-ingress-serviceaccount” cannot list resource “services” in API group “” at the cluster scope
E1214 12:22:35.863212 6 reflector.go:123] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:158: Failed to list *v1.ConfigMap: configmaps is forbidden: User “system:serviceaccount:ingress-nginx:nginx-ingress-serviceaccount” cannot list resource “configmaps” in API group “” at the cluster scope
E1214 12:22:35.863221 6 reflector.go:123] k8s.io/ingress-nginx/internal/ingress/controller/store/store.go:159: Failed to list *v1.Pod: pods is forbidden: User “system:serviceaccount:ingress-nginx:nginx-ingress-serviceaccount” cannot list resource “pods” in API group “” in the namespace “ingress-nginx”。因为ingress-controller起不来所以hello-world.info就取不到对应的address。个人感觉问题还是在ingress-nginx-controller这一层。虽图片描述然hello-world.info能ping通,但是80是没有起来的。

图片描述
图片描述
图片描述

正在回答 回答被采纳积分+3

2回答

清风 2021-12-15 15:27:52

你进qq群,把几个yaml文件发出来看看

0 回复 有任何疑惑可以回复我~
  • 老师,QQ群号可以发下吗?
    回复 有任何疑惑可以回复我~ 2023-03-31 11:45:57
清风 2021-12-15 15:06:57
root@local:~# vi cluster-role-binding.yaml 
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: nginx-ingress-clusterrole-nisa-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: nginx-ingress-clusterrole
subjects:
  - kind: ServiceAccount
    name: nginx-ingress-serviceaccount
    namespace: ingress-nginx

参考这个赋予权限。另外你更新代码了吗

0 回复 有任何疑惑可以回复我~
  • 提问者 扎西石 #1
    更新了啊。但是6-6-ingress-nginx-controller.yaml文件跟之前的没有什么变化。
    [root@node1 ~]# kubectl create -f cluster-role-binding.yaml
    error: unable to recognize "cluster-role-binding.yaml": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
    回复 有任何疑惑可以回复我~ 2021-12-15 15:15:03
  • 提问者 扎西石 #2
    我把6-6-ingress-nginx-controller.yaml中的kind: ClusterRoleBinding 改成上面这一段之后然后重新create了可报错还是那样的。
    回复 有任何疑惑可以回复我~ 2021-12-15 15:22:16
  • 清风 回复 提问者 扎西石 #3
    我没有重现你的问题,这个问题是这个account没有被赋予正确的权限
    回复 有任何疑惑可以回复我~ 2021-12-15 15:22:41
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信