realtheory/theory-k8s-collector-linux-arm64RealTheory collector Docker镜像专为Kubernetes集群监控设计,提供对集群可靠性、性能及成本的全方位监控能力。通过采集并分析集群关键指标,帮助用户实时掌握集群运行状态,优化资源配置,降低运维风险。
bashdocker run -d \ --name realtheory-collector \ -v /path/to/kubeconfig:/etc/kubeconfig \ -e KUBERNETES_API_URL="[***]" \ -e AUTH_TOKEN="your-auth-token" \ -e MONITOR_INTERVAL="30s" \ realtheory/collector:latest
创建docker-compose.yml文件:
yamlversion: '3' services: realtheory-collector: image: realtheory/collector:latest container_name: realtheory-collector volumes: - /path/to/kubeconfig:/etc/kubeconfig environment: - KUBERNETES_API_URL=[***] - AUTH_TOKEN=your-auth-token - MONITOR_INTERVAL=30s restart: always
启动命令:
bashdocker-compose up -d
推荐通过DaemonSet部署以确保集群中每个节点均运行collector:
yamlapiVersion: apps/v1 kind: DaemonSet metadata: name: realtheory-collector namespace: monitoring spec: selector: matchLabels: app: realtheory-collector template: metadata: labels: app: realtheory-collector spec: containers: - name: realtheory-collector image: realtheory/collector:latest env: - name: KUBERNETES_API_URL value: "[***]" - name: MONITOR_INTERVAL value: "30s" volumeMounts: - name: kubeconfig mountPath: /etc/kubeconfig readOnly: true volumes: - name: kubeconfig hostPath: path: /var/lib/kubelet/config.yaml
| 环境变量 | 描述 | 默认值 | 示例值 |
|---|---|---|---|
| KUBERNETES_API_URL | Kubernetes API服务器地址 | [***] | [***] |
| AUTH_TOKEN | 访问Kubernetes API的认证令牌 | 空(使用默认服务账户) | eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... |
| MONITOR_INTERVAL | 监控数据采集间隔 | 30s | 60s |
| LOG_LEVEL | 日志级别(debug/info/warn/error) | info | debug |
view或cluster-admin权限,根据监控需求调整)
manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务