From the course: Certified Kubernetes Administrator (CKA) Cert Prep (2024)
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Configuring application access - Kubernetes Tutorial
From the course: Certified Kubernetes Administrator (CKA) Cert Prep (2024)
Configuring application access
- In our next assignment, we are going to configure application access. So the mission was to create a Deployment with the name lab126deploy with three instances of Nginx and configure it such that it can be accessed by external users on port 32567 on each of the cluster nodes. Let me show you. So this should be pretty easy. Kubectl create deploy to start with. Lab 126deploy --image is Nginx and replicas is three. Next, kubectl expose deploy lab126deploy --port is 80 Now, that will almost bring us there. Let me show you. Kubectl get all --selector app is lab126deploy is showing that we have a service, but the service is of the type ClusterIP. And if you want the application to be accessible by a specific port on each node, you need nodePort. So we need to change the service to nodePort, but we also need to include the nodePort in the service definition. Now, if you have a look at the kubectl edit on svc lab126deploy, there you can see in the spec that there's a ports item, and this…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Module 4: Practice exams introduction26s
-
(Locked)
Learning objectives41s
-
(Locked)
Question overview3m 21s
-
(Locked)
Creating a Kubernetes cluster4m 2s
-
(Locked)
Scheduling a Pod2m 57s
-
(Locked)
Managing application initialization4m 7s
-
(Locked)
Setting up persistent storage2m 24s
-
(Locked)
Configuring application access3m 16s
-
(Locked)
Securing network traffic8m 37s
-
(Locked)
Setting up quota5m 55s
-
(Locked)
Creating a static Pod2m 6s
-
(Locked)
Troubleshooting node services2m 10s
-
(Locked)
Configuring cluster access7m 19s
-
(Locked)
Configuring taints and tolerations5m 5s
-
(Locked)
-
-