bowei / k8s-custom-iptables

How to add custom iptables rules to a Kubernetes cluster
Apache License 2.0
59 stars 34 forks source link

what does the TARGETS env var do? #5

Closed Lutando closed 6 years ago

Lutando commented 6 years ago

I am trying to get custom ip tables to work for Google Memorystore from my non IP-Aliased k8s cluster.

Do I put TARGETS="{cluster CIDR} {MemoryStore CIDR}"

eg

TARGETS="10.0.0.0/29 10.78.0.0/14" 

or just

TARGETS="10.0.0.0/29" 

where 10.78.0.0/14 is my cluster CIDR and 10.0.0.0/29 is my memorystore CIDR?

I think im misunderstanding how it works

bowei commented 6 years ago

Hi -- I see you closed your comment. Were you able to figure out the answer?

Lutando commented 6 years ago

Not particularly. I was using this to get google memory store to work in my k8s cluster without having vpc-aliasing enabled. I gave up because I spent a few days on it and got nowhere, even with help from the community, so im still running my own redis pods in k8s on GKE (not ideal)

santiarias commented 6 years ago

@Lutando TARGETS="10.0.0.0/29" should work, please verify that the network is the same for you kubernetes cluster and for your memory store.

That is likely the cause of your problem

bowei commented 6 years ago

@Lutando -- @santiarias 's comment is correct.