我正在犯错误:
# kubectl logs kube-state-metrics-fdc49658-g98sl -n monitoring
I0523 11:30:25.206556 1 main.go:86] Using default collectors
I0523 11:30:25.206766 1 main.go:98] Using all namespace
I0523 11:30:25.206800 1 main.go:139] metric white-blacklisting: blacklisting the following items:
W0523 11:30:25.206886 1 client_config.go:543] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0523 11:30:25.216265 1 main.go:184] Testing communication with server
F0523 11:30:55.217773 1 main.go:147] Failed to create client: error while trying to communicate with apiserver: Get "https://10.96.0.1:443/version?timeout=32s": dial tcp 10.96.0.1:443: i/o timeout以下是Kube状态度量的清单:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-state-metrics
spec:
selector:
matchLabels:
app: kube-state-metrics
replicas: 1
template:
metadata:
labels:
app: kube-state-metrics
spec:
nodeSelector:
boardType: aarch64
serviceAccountName: prometheus
containers:
- name: kube-state-metrics
image: carlosedp/kube-state-metrics:v1.9.6
ports:
- containerPort: 8080
name: monitoring
---
kind: Service
apiVersion: v1
metadata:
name: kube-state-metrics
spec:
selector:
app: kube-state-metrics
type: LoadBalancer
ports:
- protocol: TCP
port: 8080
targetPort: 8080发布于 2021-05-23 18:34:02
这看起来不像kube-state-metrics,但是您的节点配置/网络问题。您需要调试节点到节点的通信。首先,我将检查kube-state-metrics被调度在哪些节点上,并在该节点上启动一个临时吊舱,以确定您是否能够正确地访问API。错误可能出现在子网、安全组/防火墙或其他与网络和安全相关的组件中。
https://devops.stackexchange.com/questions/13972
复制相似问题