How is ip-masq-agent DaemonSet created? | C2C Community
Solved

How is ip-masq-agent DaemonSet created?

  • 5 August 2022
  • 4 replies
  • 248 views

Hi all,

I’ve recently created several GKE clusters through some custom Terraform code. However, by default it looks like NAT-ing from the pod network is not enabled which is not desirable. So I found this article on how to enable it:

https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent#how_ipmasq_works

 

Which did the trick just fine. However, I can’t seem to find a way to enable this during the cluster creation. I’d prefer not to have to add in the daemonset and configmap after the cluster is created. Is there any way to configure this as part of the cluster creation through Terraform? Also, this is a private cluster and I do not have access to the cluster through kubectl from where I’m running Terraform.

 

Thanks!

icon

Best answer by garyturner3 5 August 2022, 14:25

View original

4 replies

Userlevel 7
Badge +65

Hi @garyturner3 and welcome to the community.

Have you joined the Lounge section and introduced yourself using this template? If not, do it. It will be great to know more about you. What do you think?

As for your issue, it will be great to post some screenshots from your Terraform code. Can you write more things about your issue? The more the better for our members.

Found the issue. The ip-masq agent daemonset is created only if I initially create the cluster with a network policy on and using the calico provider. If I switch to using those after the initial cluster creation then the daemonset won’t be created.

Userlevel 7
Badge +65

WOW

That’s amazing @garyturner3.

Are you interested in writing a post about your experience?

Userlevel 7
Badge +28

Found the issue. The ip-masq agent daemonset is created only if I initially create the cluster with a network policy on and using the calico provider. If I switch to using those after the initial cluster creation then the daemonset won’t be created.

 

That’s great, @garyturner3 ! Thanks for letting us know. And as @ilias said, it would be great if you would like to write a post with details 😎

Reply