Set up a websocket in Google Kubernetes Engine.

0 votes
How do I enable a port on Google Kubernetes Engine to accept websocket connections? Is there a way of doing so other than using an ingress controller?
Sep 25 in GCP by anonymous
• 6,670 points
303 views

1 answer to this question.

0 votes

Web sockets are supported by Google's global load balancer, so you can use a k8s Service of type LoadBalancer to expose such service beyond your cluster.

Do bear in mind that load balancers created and managed outside Kubernetes during this manner can have a default connection duration of thirty seconds, which interferes with web socket operation and will cause the connection to be closed frequently.

This is virtually useless for net sockets to be used effectively.

Until this issue is resolved, you'll either got to modify this timeout parameter manually or (recommended) think about using an in-cluster ingress controller (e.g.nginx) which affords you more control.

answered Sep 25 by Sirajul
• 40,990 points

Related Questions In GCP

0 votes
1 answer
+1 vote
2 answers

How to open a port on google compute engine

You need to set the firewall rule ...READ MORE

answered Jul 9 in GCP by K sagar
203 views
0 votes
1 answer

How is Google App Engine (Flexible) different from Google Kubernetes Engine?

They are different things. App Engine versatile is concentrated on application ...READ MORE

answered Sep 25 in GCP by Sirajul
• 40,990 points
90 views
0 votes
1 answer
0 votes
1 answer

Is it possible to use Windows Server Containers OS in Google Kubernetes Engine?

It is possible to run Windows containers, however solely as a container in a compute Engine ...READ MORE

answered Sep 25 in GCP by anonymous
• 40,990 points
37 views