我在创建计算 IP 时遇到以下错误。 配置连接器已启用,它是托管在共享网络上的私有集群。 版本 1.17.15-gke.800
$ kubectl apply -f webapp-compute-ip. yaml
Error from server (InternalError): error when creating "webapp-compute-ip.yaml": Internal error occurred: failed calling webhook "annotation-defaulter.cnrm.cloud.google.com": Post https://cnrm-validating-webhook.cnrm-system.svc:443/annotation-defaulter?timeout=30s: dial tcp 192.168.66.130:9443: i/o timeout
$cat webapp-compute-ip.yaml
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
name: webapp-ip-test
namespace: sandbox
labels:
app: webapp
environment: test
annotations:
cnrm.cloud.google.com/project-id: "cluster-name"
spec:
location: global`
答案 0 :(得分:0)
此问题是由于配置连接器版本问题造成的。
webhook 默认端口发生了变化,从 443 到 9443,see
配置连接器版本取决于 GKE version,我没有任何控制权,而且没有关于 GKE 版本可用的配置连接器版本的公开文档。存在现有请求 here。
我的解决方案是在防火墙规则中添加端口 9443。