Projects:Kubernetes: verschil tussen versies

Naar navigatie springen Naar zoeken springen
Regel 435: Regel 435:
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. You can try this out by running <code>kubectl delete pod nginx-deployment-...</code> on your pods: the deployment will cause them to be restarted, but the port-forward will cease to work once you've deleted the right one.
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. You can try this out by running <code>kubectl delete pod nginx-deployment-...</code> on your pods: the deployment will cause them to be restarted, but the port-forward will cease to work once you've deleted the right one.


= Creating your own pods =
= Creating your own images =


So far, we've set up the standard container <code>ubuntu:bionic</code>. It's pulled from the Docker Hub at https://hub.docker.com/_/ubuntu. Docker Hub is a central registry for images. In the same way you can pull many images from there, such as the minimal Linux image <code>alpine</code>.
So far, we've set up the standard container <code>ubuntu:bionic</code>. It's pulled from the Docker Hub at https://hub.docker.com/_/ubuntu. Docker Hub is a central registry for images. In the same way you can pull many images from there, such as the minimal Linux image <code>alpine</code>.

Navigatiemenu