CKA pro托管的k8s集群 搭建过程没有报错,查看pod信息提示:Warning FailedScheduling 10m default-scheduler 0/2 nodes are available: 1 node(s) didn’t have free ports for the requested pod ports, 1 node(s) didn’t match Pod’s node affinity.

操作系统信息
例如:阿里云CKA(pro托管版),1.20.11-aliyun.1

Kubernetes版本信息
Client Versio

[upl-image-preview url=

]

: version.Info{Major:“1”, Minor:“21”, GitVersion:“v1.21.2”, GitCommit:“092fbfbf53427de67cac1e9fa54aaa09a28371d7”, GitTreeState:“clean”, BuildDate:“2021-06-16T12:59:11Z”, GoVersion:“go1.16.5”, Compiler:“gc”, Platform:“linux/amd64”}

Server Version: version.Info{Major:“1”, Minor:“20+”, GitVersion:“v1.20.11-aliyun.1”, GitCommit:“88d5e8b”, GitTreeState:"", BuildDate:“2021-10-25T13:52:50Z”, GoVersion:“go1.15.15”, Compiler:“gc”, Platform:“linux/amd64”}

容器运行时
docker version / crictl version / nerdctl version 结果贴在下方

shell@Alicloud:~$ docker version

Client: Docker Engine - Community

Version: 19.03.5

API version: 1.40

Go version: go1.12.12

Git commit: 633a0ea838

Built: Wed Nov 13 07:22:05 2019

OS/Arch: linux/amd64

Experimental: false

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

shell@Alicloud:~$ crictl version

bash: crictl: command not found

shell@Alicloud:~$ nerdctl version

bash: nerdctl: command not found

bash: crictl: command not foundere版本信息
例如:v3.2。在线安装。在有K8s上安装

问题是什么
报错日志是什么,

[upl-image-preview url=

  • Jeff 回复了此帖

    mingyang 查看的是哪个pod?你做过额外的设置么

    fay19860916没有!刚创建的集群 ,用的 命令kubectl describe pod -n kubesphere-monitoring-system node-exporter-58ljd

    • Jeff 回复了此帖

      mingyang 你看下 node-exporter 那个 ds,他需要 9100 端口,你有节点上的端口被占用了,还有看下 affinity,这个容易排查解决的

        Jeff 不同命名空间中的资源不是隔离的吗?在另外一个命名空间确实有个po的占用9100端口,我改了端口号,也不行!两个node节点也都是可调度的!

          pod都运行起来了,但是进不了kubesphere的登录页面,一直转圈圈

            mingyang

            不同Pod内部的资源是互相隔离的,但是如果把容器端口映射到宿主机,那就是处于宿主机的根命名空间,是共享的。

            mingyang

            F12查看浏览器网络请求,再刷新页面看看是什么请求卡住了或者出错了

            再把所有pod的运行情况都检查一下

            `kubectl get pod -n kubesphere-system`

            wangcf1009
            你这个报错是k8s dns解析失败,先看看ks-apiserver是否正常运行,再根据k8s官方文档排查下dns吧。