Certified Kubernetes Administrator (CKA) Practice Exam: Part 2
Last updated
Last updated
Edit the Web Frontend Deployment to Expose the HTTP Port
In the web
namespace, there is a deployment called web-frontend
.
Edit this deployment so that the containers within its Pods expose port 80.
Linux
Add the following lines then save the file
Create a Service to Expose the Web Frontend Deployment's Pods Externally
Create a service called web-frontend-svc
in the web
namespace. This service should make the Pods from the web-frontend
deployment in the web
namespace reachable from outside the cluster.
External entities should be able to reach the service by contacting any node in the cluster on port 30080.
Linux
web-frontend-svc.yml
Linux
Scale Up the Web Frontend Deployment
Scale the web-frontend
deployment in the web
namespace up to 5
replicas.
Linux
Create an Ingress That Maps to the New Service
Create an Ingress called web-frontend-ingress
in the web
namespace that maps to the web-frontend-svc
service in the web
namespace. The Ingress should map all requests on the /
path.
Linux
web-frontend-ingress.yml
Linux