「KUBERNETES/KUBECTL」- 常见问题汇总

[Sol] … specifying a root certificates file with the insecure flag is not allowed …

okteto shows error: specifying a root certificates file with the insecure flag is not allowed when interacting with k8s cluster

问题描述

执行 kubectl 命令,产生 Error: Kubernetes cluster unreachable: specifying a root certificates file with the insecure flag is not allowed 错误。

原因分析

okteto shows error: specifying a root certificates file with the insecure flag is not allowed when interacting with k8s cluster · Issue #3124 · okteto/okteto

解决方案

删除 clusters[].cluster.certificate-authority-data 数据,或者不要使用 clusters[].cluster.insecure-skip-tls-verify: true 选项;