nutritious-application-85076
06/23/2022, 2:33 PMapiVersion: v1
kind: Node
metadata:
annotations:
<http://alpha.kubernetes.io/provided-node-ip|alpha.kubernetes.io/provided-node-ip>: 192.168.205.2
Nevertheless this IP address do not correspond to the Lima VM Eth0 IP
lima-rancher-desktop:/Users/cmoullia$ ifconfig
eth0 Link encap:Ethernet HWaddr 52:55:55:4A:B8:EC
inet addr:192.168.5.15 Bcast:0.0.0.0 Mask:255.255.255.0
So I'm wondering where this IP is configured and if we can access it from the local machine (= macbook) ?freezing-airplane-30363
06/23/2022, 2:41 PMnutritious-application-85076
06/23/2022, 2:43 PMfreezing-airplane-30363
06/23/2022, 2:43 PMnutritious-application-85076
06/23/2022, 2:43 PMkubectx
cmoullia/c114-e-eu-de-containers-cloud-ibm-com:32429/IAM#cmoullia@redhat.com
default/c114-e-eu-de-containers-cloud-ibm-com:32429/IAM#cmoullia@redhat.com
kind-kind
kubernetes-admin@kubernetes
--> "rancher-desktop"
and
k get nodes
NAME STATUS ROLES AGE VERSION
lima-rancher-desktop Ready control-plane,master 143d v1.21.9+k3s1
freezing-airplane-30363
06/23/2022, 2:45 PM$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
lima-rancher-desktop Ready control-plane,master 27h v1.23.6+k3s1 192.168.5.15 <none> Alpine Linux v3.15 5.15.40-0-virt <containerd://1.5.11>
nutritious-application-85076
06/23/2022, 2:46 PMk get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
lima-rancher-desktop Ready control-plane,master 143d v1.21.9+k3s1 192.168.205.2 <none> Alpine Linux v3.15 5.15.40-0-virt <containerd://1.5.11>
freezing-airplane-30363
06/23/2022, 2:46 PMnutritious-application-85076
06/23/2022, 2:47 PMfreezing-airplane-30363
06/23/2022, 2:49 PMnutritious-application-85076
06/23/2022, 2:51 PMk get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
lima-rancher-desktop Ready control-plane,master 2m31s v1.21.9+k3s1 192.168.5.15 <none> Alpine Linux v3.15 5.15.40-0-virt <containerd://1.5.11>
~ ping 192.168.5.15
PING 192.168.5.15 (192.168.5.15): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
freezing-airplane-30363
06/23/2022, 2:53 PMrdctl shell
to get into lima shellnutritious-application-85076
06/23/2022, 2:55 PMrdctl shell
lima-rancher-desktop:/Users/cmoullia$ ifcofig
/bin/ash: ifcofig: not found
lima-rancher-desktop:/Users/cmoullia$ ifconfig
cni0 Link encap:Ethernet HWaddr E6:D9:93:FB:DE:B2
inet addr:10.42.0.1 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::e4d9:93ff:fefb:deb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:8242 errors:0 dropped:0 overruns:0 frame:0
TX packets:8665 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1859556 (1.7 MiB) TX bytes:2949775 (2.8 MiB)
eth0 Link encap:Ethernet HWaddr 52:55:55:4A:B8:EC
inet addr:192.168.5.15 Bcast:0.0.0.0 Mask:255.255.255.0
freezing-airplane-30363
06/23/2022, 2:56 PMnutritious-application-85076
06/23/2022, 3:02 PM192.168.5.15
as on my mac the IP address is 192.168.1.90
?freezing-airplane-30363
06/23/2022, 4:12 PM- host: <http://myhost.127.0.0.1.nip.io|myhost.127.0.0.1.nip.io>
fast-garage-66093
06/23/2022, 4:19 PM192.168.5.0/24
, and the additional networks supported on macOS (bridged and shared) (interfaces rd0
and rd1
). The additional interfaces are "real" interfaces and don't use port forwarding, but are only available when you enable "administrative" access ("sudo").192.168.205.2
address is from the shared network range, so should have been reachable from inside the host, but not from other machines on the local network. I don't know why this didn't work for you, and it is too late now to investigate since you reset the configuration.192.168.205.0/24
subnet so it doesn't conflict if you also run regular lima side-by-side with it).nutritious-application-85076
06/23/2022, 4:38 PMsudo
and do another test. That should be great to better document how networks are configured between the host and VMs like also that someone add a getting started real example using traefix ;-)IP=$(get node/lima-rancher-desktop -o json | jq ".status.addresses[0].address")
• Set up the ingress host to : <http://whoami.192.168.205.2.nip.io/>
• Access from my browser <http://whoami.192.168.205.2.nip.io/>
fast-garage-66093
06/23/2022, 5:00 PM$ curl -k https://$(kubectl get svc traefik -n kube-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
404 page not found
404
means it worked 🙂 Otherwise you would have gotten connection refused or some other lower level error. If you can make an https connection, it means you have reached the ingress controllernutritious-application-85076
06/23/2022, 5:22 PMAnd, is it working?
Yes 🙂fast-garage-66093
06/23/2022, 5:23 PMnutritious-application-85076
06/23/2022, 5:34 PMcurl -k https://$(kubectl get svc traefik -n kube-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
404 page not found