minikube addons enable ingress 启动错误

开启 minkube ingress 时错误

minikube addons enable ingress --alsologtostderr

Verifying ingress addon...
Verifying ingress addon...
I1002 16:59:15.398329 827754 kapi.go:75] Waiting for pod with label "app.kubernetes.io/name=ingress-nginx" in ns "kube-system" ...
I1002 16:59:15.416235 827754 kapi.go:86] Found 2 Pods for label selector app.kubernetes.io/name=ingress-nginx
I1002 16:59:15.416270 827754 kapi.go:96] waiting for pod "app.kubernetes.io/name=ingress-nginx", current state: Pending: [<nil>]
I1002 16:59:15.920492 827754 kapi.go:96] waiting for pod "app.kubernetes.io/name=ingress-nginx", current state: Pending: [<nil>]
I1002 16:59:16.419519 827754 kapi.go:96] waiting for pod "app.kubernetes.io/name=ingress-nginx", current state: Pending: [<nil>]
I1002 16:59:16.919852 827754 kapi.go:96] waiting for pod "app.kubernetes.io/name=ingress-nginx", current state: Pending: [<nil>]
I1002 16:59:17.419814 827754 kapi.go:96] waiting for pod "app.kubernetes.io/name=ingress-nginx", current state: Pending: [<nil>]

查看对应POD启动日志

k get pods -A

kube-system            ingress-nginx-controller-56b4dfdb44-xfp2c   0/1     ImagePullBackOff   0          96s

k logs ingress-nginx-controller-56b4dfdb44-xfp2c -n kube-system

Error from server (BadRequest): container "controller" in pod "ingress-nginx-controller-56b4dfdb44-xfp2c" is waiting to start: trying and failing to pull image

查看POD详细信息

k describe pod/ingress-nginx-controller-56b4dfdb44-xfp2c -n kube-system

Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling <unknown> 0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.
Warning FailedScheduling <unknown> 0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.
Normal Scheduled <unknown> Successfully assigned kube-system/ingress-nginx-controller-56b4dfdb44-xfp2c to minikube
Normal Pulling 2m1s (x4 over 3m30s) kubelet, minikube Pulling image "registry.cn-hangzhou.aliyuncs.com/google_containers/controller:v0.40.2"
Warning Failed 2m1s (x4 over 3m29s) kubelet, minikube Failed to pull image "registry.cn-hangzhou.aliyuncs.com/google_containers/controller:v0.40.2": rpc error: code = Unknown desc = Error response from daemon: pull access denied for registry.cn-hangzhou.aliyuncs.com/google_containers/controller, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 2m1s (x4 over 3m29s) kubelet, minikube Error: ErrImagePull
Warning Failed 105s (x6 over 3m29s) kubelet, minikube Error: ImagePullBackOff
Normal BackOff 91s (x7 over 3m29s) kubelet, minikube Back-off pulling image "registry.cn-hangzhou.aliyuncs.com/google_containers/controller:v0.40.2"

重点错误信息:

Back-off pulling image "registry.cn-hangzhou.aliyuncs.com/google_containers/controller:v0.40.2"

一般我们都是用的阿里云的容器镜像源,但是controller:v0.40.2版本的镜像不存在。

通过搜索有其他镜像可以用

registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.25.1
registry.aliyuncs.com/google_containers/nginx-ingress-controller:0.26.1

要想修改POD镜像,需要从 deployment 对象 ingress-nginx-controller 开始。

k get  deployment --all-namespaces
NAMESPACE              NAME                        READY   UP-TO-DATE   AVAILABLE   AGE
kube-system ingress-nginx-controller 0/1 1 0 20h

图1

图2

对上图两处image参数进行修改。使用上面的两个镜像地址选一个替换。

删掉历史ReplicaSet 对象。

k get rs --all-namespaces

POD启动权限相关错误

k get pods -A
NAMESPACE              NAME                                        READY   STATUS             RESTARTS   AGE
kube-system ingress-nginx-controller-79b88546bb-vpxlr 0/1 CrashLoopBackOff 26 112m
0 8h
k logs ingress-nginx-controller-79b88546bb-vpxlr -n kube-system
-------------------------------------------------------------------------------
NGINX Ingress controller
Release: 0.26.1
Build: git-2de5a893a
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: openresty/1.15.8.2 ------------------------------------------------------------------------------- W1002 11:08:49.444500 7 flags.go:243] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
W1002 11:08:49.444562 7 client_config.go:541] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I1002 11:08:49.444686 7 main.go:182] Creating API client for https://10.96.0.1:443
I1002 11:08:49.459177 7 main.go:226] Running in Kubernetes cluster version v1.20 (v1.20.0) - git (clean) commit af46c47ce925f4c4ad5cc8d1fca46c7b77d13b38 - platform linux/amd64
F1002 11:08:49.608094 7 ssl.go:389] unexpected error storing fake SSL Cert: could not create PEM certificate file /etc/ingress-controller/ssl/default-fake-certificate.pem: open /etc/ingress-controller/ssl/default-fake-certificate.pem: permission denied

编辑 deployment 修改runAsUser=33

图3

图4

创建 ingress 错误

k create -f kubia-ingress.yaml
error when creating "kubia-ingress.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post "https://ingress-nginx-controller-admission.kube-system.svc:443/networking/v1beta1/ingresses?timeout=10s": x509: certificate signed by unknown authority

这个比较好处理,网上能找到办法。直接删除准入验证。

详细参考:https://kubernetes.io/zh/docs/reference/access-authn-authz/extensible-admission-controllers/

kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission

minikube addons enable ingress 启动错误的更多相关文章

  1. 如何处理VirtualBox启动错误消息:The vboxdrv kernel module is not loaded

    我在启动minikube时,遇到如下错误消息: Starting local Kubernetes v1.10.0 cluster... Starting VM... E1010 03:27:37.9 ...

  2. weblogic启动错误

    一 .weblogic启动错误:java.lang.AccessertionError:java.lang.reflect.InvocationTargetException <unable t ...

  3. MySQL启动错误排查

    一般情况下mysql的启动错误还是很容易排查的,但是今天我们就来说一下不一般的情况.拿到一台服务器,安装完mysql后进行启动,启动错误如下: 有同学会说,哥们儿你是不是buffer pool设置太大 ...

  4. 【转】win7与ubuntu双系统,删除ubuntu后,启动错误error:no such partition grub rescue的修复--不错

    原文网址:http://blog.sina.com.cn/s/blog_541900d50101eu9r.html win7于ubuntu双系统,进入windows后直接格式化硬盘分区将ubuntu删 ...

  5. Windows Time服务无法启动 错误5拒绝访问

    接着上次写的文章 XP和Win7设置系统自动同步系统时间方法 本文就把故障出现的过程和解决方法一共写下来,希望大家可以看到本文在解决此项服务的思路.大家以后出现类似的问题和问题可以一样使用此类方法解决 ...

  6. VisualSVN Server启动错误(0x8007042a)

    SVN Server启动错误(0x8007042a)   原因是SVN Server端口被占用 打开VisualSVN Server, 菜单->操作->Properties->Net ...

  7. myeclipse启动错误:org.eclipse.swt.SWTError: No more handles

    myeclipse启动错误,生成日志: !SESSION 2014-11-06 09:13:16.296 ----------------------------------------------- ...

  8. 关于form表单提交到Servlet的时候出现tomcat启动错误的解决方法

    1.遇到的问题 今天在写jsp代码的时候通过form表单提交到Servlet的时候出现的tomcat启动错误,琢磨了半天,终于找到了解决方法. 解决问题的关键就在于xml配置的路径和servlet中默 ...

  9. VirtualBOX启动错误the vm session was closed before any attempt to power it on解决办法

    昨天晚上笔记本休眠后,今天早上启动vm时,报错了. 点击详细启动错误:the vm session was closed before any attempt topower it on. 解决办法: ...

随机推荐

  1. ThreadLocal, volatile, synchronized, map, epoll, AQS简单总结

    ThreadLocal ThreadLocal主要是为了解决内存泄漏的问题,它是一种弱引用: 引用总共有四种,,我简单列一下: 强引用(Strong Reference):正常引用,根据垃圾回收算法, ...

  2. 并发编程之:JMM

    并发编程之:JMM 大家好,我是小黑,一个在互联网苟且偷生的农民工. 上一期给大家分享了关于Java中线程相关的一些基础知识.在关于线程终止的例子中,第一个方法讲到要想终止一个线程,可以使用标志位的方 ...

  3. 将 VS2017下开发的程序, 部署到其他电脑上运行

    关键步骤:设置Release,如下图 如果无法直接执行,则安装ALI213-Microsoft.Visual.C++.2017.Redistributable.Package.x86.x64

  4. Mysql force index和ignore index 使用实例

    前几天统计一个sql,是一个人提交了多少工单,顺便做了相关sql优化.数据大概2000多w. select CustName,count(1) c from WorkOrder where Creat ...

  5. DorisDB升级为StarRocks,全面开源!

    今天被朋友圈刷屏了,StarRocks开源--携手未来,星辰大海! 原文链接:StarRocks开源--携手未来,星辰大海! 可能大家对StarRocks不太熟悉,但是DorisDB想必都是听说过的. ...

  6. springMVC学习总结(二) --springMVC表单处理、标签库、静态文件处理

    根据springMVC学习总结(一) --springMVC搭建 搭建项目 一.表单处理 1.创建两个java类 Student.java, StudentController.java. 2.在js ...

  7. set类型数据的操作指令

    集合无序,无下标. 1. 也可以在集合上继续添加元素. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

  8. shell循环语句until

    until 条件 do 执行命令 done until 循环与 while 循环在处理方式上刚好相反. 当条件成立的时候,停止循环.

  9. PyQt5 笔记

    一.简介 pyqt5做为Python的一个模块,它有620多个类和6000个函数和方法.这是一个跨平台的工具包,它可以运行在所有主要的操作系统,包括UNIX,Windows,Mac OS.pyqt5是 ...

  10. Jenkins(8)- CentOS 7.x 通过yum安装jenkins

    如果想从头学起Jenkins的话,可以看看这一系列的文章哦 https://www.cnblogs.com/poloyy/category/1645399.html 下载rpm包 sudo wget ...