How to forward requests from internet to k8s services

2/20/2021

I tried to search, but I can't find nothing.

What I have:

  • single node k8s cluster
  • two game servers(project zomboid and valheim)
  • some web app listening http requests

My problem is

I can't access my services. I don't know what to do to forward requests from internet directly to my services.

I tried to make nginx server on host machine and forward using reverse proxy. It is working good for http requests. I can forward each subdomain.domain.com to each of my services.

My Questions 1. What about tcp/udp requests? 2. How I can forward them? 3. Is it a good way having nginx on host machine? 4. Is it possible to route tcp/udp requests by domain name(e.g. mygameserver:700 redirects to gameserver1 ip and myanothergameserver:700 redirects to anothergameserver ip?

kubectl get all

-- Azamat
kubernetes
nginx

0 Answers