2

我们正在开发用于混合设置 (GCP) 的基础架构即代码。作为其中的一部分,我们必须使用本地 Kubernetes 集群挂载云网络 Filestore。我们在 GCP 中为本地和云环境维护两个 VPC 网络。我们已经配置了所需的 Google Cloud HA VPN,可以安全地将本地 VPC 网络连接到云 VPC。我们已经通过 VPN 验证了来自 VPC 网络中的实例的私有连接,以访问第二个网络 VPC 中的实例。但是我们无法通过 VPN 挂载 Filestore。

这是 kubectl describe pod 命令输出。

Events:
  Type     Reason       Age                  From               Message
  ----     ------       ----                 ----               -------
  Normal   Scheduled    9m46s                default-scheduler  Successfully assigned axp/filestore-operations-755fd78fb6-w7z5d to gke-hybrid-onprem-kuber-app-node-pool-21f25437-nfvx
  Warning  FailedMount  57s (x4 over 7m43s)  kubelet            Unable to attach or mount volumes: unmounted volumes=[nfs-pvc], unattached volumes=[nfs-pvc kube-api-access-drvb5]: timed out waiting for the condition
  Warning  FailedMount  42s (x3 over 6m46s)  kubelet            MountVolume.SetUp failed for volume "xligw-pilot-pv" : mount failed: exit status 1
Mounting command: /home/kubernetes/containerized_mounter/mounter
Mounting arguments: mount -t nfs <ip_address>:/filestore_vol1 /var/lib/kubelet/pods/49bde489-bf00-47e1-94ba-eeccfb803ec1/volumes/kubernetes.io~nfs/xligw-pilot-pv
Output: Mount failed: mount failed: exit status 32
Mounting command: chroot
Mounting arguments: [/home/kubernetes/containerized_mounter/rootfs mount -t nfs <ip_address>:/filestore_vol1 /var/lib/kubelet/pods/49bde489-bf00-47e1-94ba-eeccfb803ec1/volumes/kubernetes.io~nfs/xligw-pilot-pv]
Output: mount.nfs: Connection timed out

此外,我在 BGP 配置期间将 Filestore 实例的 IP 地址作为自定义路由进行了通告。

https://cloud.google.com/network-connectivity/docs/router/how-to/advertising-custom-ip

感谢您是否可以为此提出解决方案。

4

0 回答 0