Can colima with k3s and a nginx-ingress point to locally hosted service?
- Linguagem predominante
- Go
- Estrelas
- 30.8k
- Forks
- 613
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### Description
Deploy colima with kubernetes enabled, I then normally would deploy a service as a POD, expose the service via ingress using nginx-ingress. This works well.
Now the problem/question I am trying to solve is having my ingress point to a service that is external running on my localhost.
Example:
The service I create runs on lets say port `8080` and what I want to do is run it on my local host on port `8080` and code/debug locally - not running the service in a pod; but ideally still being able to access this via the ingress URL - example: `demo.example.com` which should then direct to my service on `localhost` port `8080`.
But I get "Bad Gateway" as my ingress cannot get to the correct destination.
And what seem to happen is the traffic is hitting the ingress External-IP - 192.168.106.10 on port 8080, but this will not work as it will not get to my local host.
```
$ kubectl get service ingress-nginx-controller --namespace=ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller LoadBalancer 10.43.254.45 192.168.106.10 80:31912/TCP,443:30173/TCP 23h
```
Environment is on Apple Mac M1 using Colima 0.5.4 with command below to create the environment:
```
colima --profile local-demo start \
--cpu 6 \
--memory 8 \
--disk 20 \
--with-kubernetes \
--kubernetes-disable="traefik" \
--kubernetes-version="v1.24.3+k3s1" \
--network-address \
--ssh-agent \
--mount-type 9p
```
```
$ colima list
PROFILE STATUS ARCH CPUS MEMORY DISK RUNTIME ADDRESS
local-demo Running aarch64 6 8GiB 20GiB docker+k3s 192.168.106.10
```
Is this possible with colima with kubernetes? Is tunnels needed like what is required in minikube with "minikube tunnel" etc?
I will work on creating a basic example to post as my current one is getting complex, but wanted to confirm if this is even possible. Any pointers much appreciated.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.