From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Starting containers

Starting containers

- So now that you know about containers and container images, you should start them. How does it work? Well, you need to refer to the image that is needed to start a container. And the exact way to start a container depends on the container engine that you are using. In Docker, for instance, you can use the command docker run nginx. And just nginx will do because Docker is hard-coded to fetch container images from Docker Hub. And there's nothing wrong with it because Docker Hub has so many container images. In Podman, they want you to use an FQCN, the fully qualified container image name. So the command in Podman will be podman run docker.io/library/nginx. And that is because Podman doesn't prefer any image registry. You need to be specific about it. If you are going to use Kubernetes, you will use kubectl run mynginx, which is the name of the pod that you are creating, followed by --image=docker.io/library/nginx. Notice that in this example I'm using a fully qualified container image…

Contents