InterviewSolution
Saved Bookmarks
| 1. |
I have one POD and inside 2 containers are running one is Nginx and another one is wordpress So, how can access these 2 containers from the Browser with IP address? |
|
Answer» Just do port forward kubectl port-forward [nginx-pod-name] 80:80 kubectl port-forward [wordpress-pod-name] drupal-port:wordpress-port. To make it permanent, you NEED to expose those through nodeports whenever you do kubectl port forward it adds a rule to the firewall to allow that traffic across nodes but by default that isn’t allowed since flannel or firewall probably blocks it.proxy tries to connect over the NETWORK of the apiserver host as you correctly found, port-forward on the other hand is a mechanism that the node KUBELET exposes over its own API |
|