bureaucraten, interfacemoderatoren, Beheerders (Semantic MediaWiki), Curatoren (Semantic MediaWiki), Redacteuren (Semantic MediaWiki), toezichthouders, beheerders
205
bewerkingen
Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
Regel 411: | Regel 411: | ||
Now, we'd like to see nginx in action! The pod is listening on an internal port 80 (according to its configuration and the default nginx config). If we want to access this from outside the cluster, there's three ways: | Now, we'd like to see nginx in action! The pod is listening on an internal port 80 (according to its configuration and the default nginx config). If we want to access this from outside the cluster, there's three ways: | ||
* <code>kubectl port-forward</code>, which listens to a local port on the machine where you run <code>kubectl port-forward</code>, and then forwards all connections to | * <code>kubectl port-forward</code>, which listens to a local port on the machine where you run <code>kubectl port-forward</code>, and then forwards all connections to a pod. (I've explained above how to configure kubectl so it can run on your own machine when the cluster runs elsewhere.) | ||
* Creating a Service | * Creating a Service | ||
* Creating an Ingress | * Creating an Ingress | ||
Regel 425: | Regel 425: | ||
Now, visit <code>http://127.0.0.1:8080</code> in your browser and presto! | Now, visit <code>http://127.0.0.1:8080</code> in your browser and presto! | ||
You can also do a port-forward to a deployment: | |||
<pre> | <pre> | ||
Regel 433: | Regel 433: | ||
</pre> | </pre> | ||
When you start a port-forward to a deployment, the deployment is resolved to a random one of the <code>Running</code> pods in the deployment. So, in this case, you'll get a response from ''either'' of the two pods; if one of them is down, you'll get it from the one that's up. (If both are down, you're out of luck.) However, when that resolved pod goes down for whatever reason, the port-forward is '''not''' restarted to another pod in the deployment. | |||
= Creating your own pods = | = Creating your own pods = |