我有一个正在运行的Kubernetes集群设置,我想在同一配置上设置kube-state-metrics。当我要在群集上创建kube-state-metrics时,POD没有创建,并且由于CrashLoopBackOff错误而失败。
当我检查该kube-state-metrics POD的日志时,发现以下内容:
I0827 10:52:50.095813 1 main.go:87] Using default collectors
I0827 10:52:50.095927 1 main.go:99] Using all namespace
I0827 10:52:50.095949 1 main.go:140] metric white-blacklisting: blacklisting the following items:
W0827 10:52:50.095986 1 client_config.go:541] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0827 10:52:50.098367 1 main.go:185] Testing communication with server
我已经跑步 kubectl版本
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:23:26Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:09:21Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
并使用quay.io中的docker映像 quay.io/coreos/kube-state-metrics:v1.7.2
我确实按照以下步骤配置了kube-state-metrics
git clone https://github.com/kubernetes/kube-state-metrics.git
cd kube-state-metrics
kubectl create -f kubernetes /