https://pulumi.com logo
#google-cloud
Title
# google-cloud
m

miniature-rose-15269

06/04/2020, 8:10 PM
not sure if anyone has bumped into this but with the Istio addon on GKE, how can I get the external IP of the ingress gateway? It’s automatically created by GCP so I don’t have the resource in Pulumi to be able to output the load balancer IP. Any ideas?
g

green-school-95910

06/04/2020, 8:20 PM
Copy code
k8s.core.v1.Service.get("istio-ingressgateway", "istio-system/istio-ingressgateway")
They are always installed on namespace
istio-system
with the same names, you can get them as a external resource.
m

miniature-rose-15269

06/04/2020, 8:51 PM
thank you!!
@green-school-95910 is there a way to patch this resource via Pulumi? Want to try and assign a static IP (it’s ephemeral by default)
I mean the equivalent to:
kubectl patch
g

green-school-95910

06/04/2020, 9:01 PM
Yes there is, you can import the resource into Pulumi so it can be managed by it. I don't remember how exactly, I did it to import resources created with terraform. I'm on my phone now, if no one finds it till I get to my PC to check I'll send it here.
m

miniature-rose-15269

06/04/2020, 9:44 PM
thank you
g

green-school-95910

06/04/2020, 9:53 PM
Copy code
new k8s.core.v1.Service(
  "istio-ingressgateway",
  {
  // The service definition as if it was not created automatically, you'll have to manage it completely
  },
  {
    import: 'istio-system/istio-ingressgateway'
  },
);
m

miniature-rose-15269

06/05/2020, 9:29 AM
this is what I needed, thank you @green-school-95910 - life saver
2 Views