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.

Exposing applications

Exposing applications

- Okay, in the next assignment, you are going to expose some applications. So use a minikube ip command to find the IP address that is used by your minikube instance. And next add a line to /etc/hosts, which says the IP address of your minikube followed by myapp.info. And if it's necessary, change the IP address. Then you expose the updates application that you have created in task six, using a Service with the name task7svc. And ensure this application is accessible by using the URL, myapp.info. And to test use the command, curl myapp.info. So let me show you. So to start with, I need to sudo vim on /etc/hosts, and I need to make sure that myapp.info is included. I have myapp.local from a previous example. Let me change it to myapp.info. So this takes care of the hostname resolving. And then I need to expose the updates application using a service with the name, task7svc. So kubectl expose deploy updates - -name=task7svc --port=80. And let's do the kubectl get all --selector…

Contents