1

I'm fairly new to K8. Using k3d/helm, I installed an application on our on-prem ssh server. I did port forward on 8080. I'm able to do "curl localhost:8080" when I'm inside the server. Could you plz guide me how can I access this application from my local machine? I tried using the private ip/hostname of the server but didn't work. I don't want to expose the app to internet but only access it over company intranet.

Thanks

<k3d cluster create test

helm install XXXXXX

sudo kubectl -n test port-forward service/api-gateway-nginx 8080:80>

Should be able to access the application from outside the VM

David Maze
  • 130,717
  • 29
  • 175
  • 215
J Jena
  • 51
  • 3

1 Answers1

0

Posting here for others based on how it worked for me:

  • For bare metal servers running k8s, the recommended LB is MetalLB. So this is what I did to make it work.

`sudo k3d cluster create mykeptn -p "8080:80@loadbalancer" --k3s-arg "--no-deploy=traefik@server:*"

export KUBECONFIG=$(sudo k3d kubeconfig write mykeptn)

sudo helm repo add metallb https://metallb.github.io/metallb

sudo helm install metallb metallb/metallb

sudo helm repo add keptn https://charts.keptn.sh && sudo helm repo update

sudo helm install keptn keptn/keptn -n keptn --create-namespace --set=continuousDelivery.enabled=true,apiGatewayNginx.type=LoadBalancer`

With this my nginx api gateway started runnning with ingress type LoadBalancer. External IP status showed pending which is fine as I don't want to expose to internet.

Now I could access the app from my local laptop using http://:8080

J Jena
  • 51
  • 3