Ben Baldwin
Ben Baldwin

Reputation: 497

How to access google kubernetes engine service from a client

I set up a kubernetes cluster on GKE that runs a UDP game server. How do I ask kubernetes to start a new container from a game client, and how do I then get the ip address and port of that container so I can communicate with the server from the client.

Upvotes: 0

Views: 126

Answers (1)

Goli Nikitha
Goli Nikitha

Reputation: 928

You can create a service in Google Kubernetes Engine and can be accessed by public IP address. You can create a load balancer autoscaler service which internally takes care of creating new containers when there is increase in traffic.

Here are some documentation for creating service to access cluster and creating a load balancer service.There are other equivalent ways to start new pods on demand using Kubernetes API.

You can get IP address by using this command: kubectl get pods -o wide

Upvotes: 2

Related Questions