I'm new to K8s trying to access the app by IP. Below is the situation -
XXX.XXX.XXX.XXX/app1
and XXX.XXX.XXX.XXX/app2
, in what files & what changes I have to do? Services are showing status as <pending>
? What does that mean 🧐If you are using "LoadBalancer" type as the service, obviously you should install or use a 3rd party LoadBalancer, since you're using a BARE-METAL environment. For example you can use MetalLB.
You can find more information regarding MetalLB below: https://blog.inkubate.io/install-and-configure-metallb-as-a-load-balancer-for-kubernetes/
If not, you may have to use "NodePort" type as the service.
Why do you need ingress controller on bare metal?
Try to use simple NodePort service types, it will give you same result. Ingress controller more preferrable when you have it behind cloud load balancer.
Getting back to your question 4:
You can do this only if you have cloud load balancer in front of ingress controller, in any other case you'll have to do something like this: XXX.XXX.XXX.XXX:$INGRESS_CONTROLLER_PORT/$PATH
which refers to: XXX.XXX.XXX.XXX
($K8S_cluster_IP).
And it's almost the same scenario as with NodePort service.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.