Welcome to the containerized application deployment demo.
In this video, we explore various methods to deploy a containerized application.
We start with the kubectl command line tool, then we continue with the dashboard.
With kubectl, we can run a containerized application with the kubectl create deployment command.
We name the deployment web-cli and we'll be running an nginx container image.
To display all the artifacts created by the command, the deployment, the replicaset and the pod, we run this command
using the label for filtering,
and we see the pod, the deployment, and the replicaset.
kubectl also allows us to run a containerized application from a yaml manifest.
Let's review the manifest.
This would create a deployment named web-cli-file,
the labels and the selectors are the same, named web-cli-file,
the deployment will be managing a single replica,
and the pod will be running an nginx container image.
We're also specifying the container port, port 80.
Now, let's run the application.
Now, let's display all the artifacts: the deployment, the replicaset and the pod.
So we see the pod, we see the deployment, and the associated replica set.
Both applications deployed so far are running nginx web servers in pods.
Let's expose one of them through a NodePort type service in order to view the web page in the browser.
Let's use a minikube built-in command to call the web-cli service and view the nginx web page in the default browser.
Welcome to nginx!
So far, we leveraged kubectl to deploy and expose containerized applications.
The Kubernetes Dashboard also allows us to deploy applications and expose them through services.
Let's start the minikube dashboard in the background so we have access to a terminal while it is running.
Let's click on the plus sign at the top right corner.
And then select the "Create from form" tab.
Here we are asked to input a few configuration details: the name of the deployment.
We're going to name it web-dash,
the container image will be nginx,
we leave the pods to one,
for service, we select an external service,
it will randomly be assigned a node port
on the minikube host, then we specify the service port.
Let's select port 8080, the target port 80,
has to match the nginx container port 80,
and by default, the service will be named web-dash by the name of the application.
Let's click Deploy.
Now, from the terminal, we can list all the artifacts created by the dashboard: the deployment, the replicaset, the pod and the service.
Again, we're using the label for filtering.
So, we see the pod, the service, the deployment, and finally, the replicaset,
and, as before, we can access the service with the built-in minikube service command.
Welcome to nginx!
So, in this video, we explored several methods of deploying containerized applications in Kubernetes
and exposing them with ExternalNode port services,
to be able to access these applications from outside of the minikube Kubernetes cluster.
Thank you for watching and I will see you in the next video.
Информация по комментариям в разработке