Can colima with k3s and a nginx-ingress point to locally hosted service?
- 主要语言
- Go
- 星标
- 30.8k
- 派生
- 613
- PR 合并指标
- 30 天内没有已合并 PR
描述
### 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.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。