• rancher问题积累


    1、卸载rancher出现问题

    报错信息:error: unable to retrieve the complete list of server APIs: custom.metrics.k8s.io/v1beta1: the server is currently unable to handle the request

    排查问题

    [root@localhost ~]$ kubectl get apiservice
    NAME                                   SERVICE                                                          AVAILABLE                 AGE
    v1beta1.custom.metrics.k8s.io          cattle-monitoring-system/rancher-monitoring-prometheus-adapter   False (ServiceNotFound)   24h

    解决办法

    [root@localhost ~]$ kubectl delete apiservice v1beta1.custom.metrics.k8s.io --force
    warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
    apiservice.apiregistration.k8s.io "v1beta1.custom.metrics.k8s.io" force deleted

    参考: https://blog.csdn.net/weixin_40449300/article/details/108348420

    2、serviceaccount 无法创建secrct

    报错信息:E0308 02:52:42.957365       1 tokens_controller.go:261] error synchronizing serviceaccount default/nginx-ingress-backend: Internal error occurred: failed calling webhook "rancher.cattle.io": Post "https://rancher-webhook.cattle-system.svc:443/v1/webhook/mutation?timeout=10s": service "rancher-webhook" not found

    排查问题

    通过排查,发现是有准入控制器,https://kubernetes.io/zh/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks

    [root@localhost  ~]$ kubectl get mutatingwebhookconfigurations
    NAME                             WEBHOOKS   AGE
    mutating-webhook-configuration   7          28h
    rancher-monitoring-admission     1          27h
    rancher.cattle.io                2          28h
    [root@localhost  ~]$ kubectl get validatingwebhookconfigurations
    NAME                               WEBHOOKS   AGE
    rancher-monitoring-admission       1          27h
    rancher.cattle.io                  2          28h
    validating-webhook-configuration   7          28h

    解决办法

    删除准入控制器

    [root@localhost ~]$ kubectl delete mutatingwebhookconfigurations mutating-webhook-configuration
    mutatingwebhookconfiguration.admissionregistration.k8s.io "mutating-webhook-configuration" deleted
    [root@localhost ~]$ kubectl delete mutatingwebhookconfigurations rancher-monitoring-admission
    mutatingwebhookconfiguration.admissionregistration.k8s.io "rancher-monitoring-admission" deleted
    [root@localhost ~]$ kubectl delete mutatingwebhookconfigurations rancher.cattle.io
    mutatingwebhookconfiguration.admissionregistration.k8s.io "rancher.cattle.io" deleted
    [root@localhost ~]$ kubectl delete validatingwebhookconfigurations validating-webhook-configuration
    validatingwebhookconfiguration.admissionregistration.k8s.io "validating-webhook-configuration" deleted
    [root@localhost ~]$ kubectl delete validatingwebhookconfigurations rancher-monitoring-admission
    validatingwebhookconfiguration.admissionregistration.k8s.io "rancher-monitoring-admission" deleted
    [root@localhost ~]$ kubectl delete validatingwebhookconfigurations rancher.cattle.io
    validatingwebhookconfiguration.admissionregistration.k8s.io "rancher.cattle.io" deleted
  • 相关阅读:
    delphi7 stringgrid 点列头排序
    如何作为一个优秀的ERP实施顾问
    小米生态链去年收入150亿,今年目标200亿
    msys2 安装笔记(可以按照这个关键字搜索)
    MinGW 编译 libsndfile-1.0.25(只要有 MSYS,./configure make make install 就行了)
    Apache Ignite——新一代数据库缓存系统
    VS2015 C#6.0
    Webuploader 大文件分片上传
    requirejs
    require.js
  • 原文地址:https://www.cnblogs.com/deny/p/15993508.html
Copyright © 2020-2023  润新知