How to update the default GKE VPC from 'LEGACY' subnet?

1/3/2019

I set up a manage GKE cluster a while back and the subnet creation mode is set to'Legacy VPC network'. Now I want to use filestore as a managed nfs-server however, I can not use the default network as filestore doesn't work with legacy networks. So I created a new VPC with custom subnet but I can not connect the two VPCs; I tried peering but since default network is in legacy mode, it doesn't work. As far as I know, there is no way to update the old legacy network to use either auto or custom subnets. I could not find an option to update the cluster to use a new VPC. Is there any way around this problem?

Any help/pointers would be appreciated.

Thanks.

-- S. Doe
google-cloud-filestore
google-kubernetes-engine
vpc

1 Answer

1/3/2019

Regarding your comment :“I tried peering but since default network is in legacy mode, it doesn't work.”, the easiest way to connect a legacy and a VPC network is to use Cloud VPN. There are a few caveats however:

  • The MTU is lower which might cause problems if you have large UDP packets and path MTU discovery is not working. If you are only using TCP that should not be a concern.
  • The VPN tunnels have limited throughput (~200k PPS and ~2GBit/s) this can be solved by having multiple tunnels.

Also regarding : “I could not find an option to update the cluster to use a new VPC. Is there any way around this problem? Any help/pointers would be appreciated.”, to update the cluster, you could simply create a replacement cluster in the new VPC network. Though you could connect a legacy network with a VPC network using Cloud VPN, that's not the best solution. The best solution is for you to replace your legacy network with a VPC network. It sounds like you could use a single VPC network for everything.

I would also request you to post this kind of questions in ‘Server Fault’ as ‘Stack Overflow’ is for programming and development questions.

-- Mohibul Mahmud
Source: StackOverflow