Red Hat EX180 Practice Exam

1.75 hours
  • 3 Learning Objectives

About this Hands-on Lab

The Red Hat Certified Specialist in Containers and Kubernetes exam (EX180) tests your skills and knowledge of the fundamentals of containers and OpenShift, including the ability to find, customize, run, and manage containerized services in both standalone environments and environments with both Kubernetes and OpenShift. Now that you’ve gone through all the objectives, it is time to test your newfound knowledge on the practice exam to prepare for the real exam! In this lab, you will be asked to perform a series of tasks similar to what you will be asked to do in the actual exam. Good luck, and please use this practice exam as many times as you need before taking the exam.

*This course is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Run and Manage Containers

Task 1.

  1. Configure Podman to search the registry registry-1:5000 last.
  2. Configure the registry as an insecure registry.

Task 2.

  1. Pull the latest Nginx image docker.io/library/nginx.
  2. Start a container using the Nginx image with the following:
    • Name = web-vol
    • Mount local directory /home/cloud_user/web to container as /usr/share/nginx/html
    • Run the container in the pod named task-2 by using the podman option --pod task-2
  3. Verify you can access the web page by using curl localhost:8081.
  4. Save a copy of the container logs to a file named web-vol.log.

Task 3.

  1. Pull the latest MySQL image docker.io/library/mysql.
  2. Start a container using the MySQL image with the following:
    • name=mysql-llama
    • MYSQL_PASSWORD=badpass
    • MYSQL_USER=guru
    • MYSQL_ROOT_PASSWORD=supersecret
    • MYSQL_DATABASE=llama
    • Publish port 3306 on the container to port 3306 on the localhost
  3. Verify the MySQL instance is running with the following command, and check that the llama database is there:
    • echo "show databases;" | mysql -uguru -pbadpass --protocol tcp -h localhost
  4. Make a directory named mysql_logs and copy the log file /var/lib/mysql/mysql/general_log_213.sdi to the directory.

Task 4.

  1. Start a Nginx container from registry-1:5000 using a tag that is NOT latest. Use the following parameters:
    • name=web-default
    • Publish port 80 in the container to localhost port 8080
  2. Verify you can access the web page with curl localhost:8080.
  3. Start a Bash shell on the container and modify /usr/share/nginx/html/index.html in the container, then change the current message to A guru was here!.
  4. Verify you can access the web page with curl localhost:8080 and see your new message.
  5. Commit the modified container to a new image named registry-1:5000/nginx:web-guru.
Build and Run Custom Images

Task 5.

  1. Push your new image to registry-1:5000.

  2. Stop the container web-default and start a new container using your new image. Use the following parameters:

    • name=web-guru
    • Publish port 80 in the container to localhost port 8080
  3. Verify you get your custom message with curl localhost:8080.

  4. Save your new image as a tar file named guru-web.tar.

    Task 6.

  5. Complete the incomplete Dockerfile located at /home/cloud_user/docker/Dockerfile. Details are listed in the incomplete Dockerfile.

Task 7.

  1. Build an image from the completed Dockerfile in task 6. The image should be built with the following:
    • name=llama-cart
    • tag=v1
  2. Start a container with the new image using the following settings:
    • name=llama=web
    • Publish port 90 in the container to localhost port 8090
  3. Verify the image works by putting your lab-system-name:8090 or IP-Address:8090 into a web browser.
    • Alternatively, use curl localhost:8090 and see just the text version of the page.
Creating Applications with OpenShift

Task 8.

  1. Create a new project.
    • (CodeReady Containers only)
      • Create a new project named guru-php with display name of Test hello guru project
        • (Red Hat OpenShift Sandbox)
        • Skip this and use default project username-dev
  2. Create a new PHP application with the following:
    • Git repo
    • Use the Git repo context directory php-hello-world
    • Create app as a deployment config
    • Label app=hello-guru

Task 9.

  1. Create a new project.
    • (CodeReady Containers only)
      • Create a new project named inventory
        • (Red Hat OpenShift Sandbox)
    • Skip this and use default project username-stage
      1. Download the following template:
      2. Publish the template to the current project.
      3. Process the template and save to a file named processed_template.yaml. Set the following parameters and label:
        • NAME=fruit-stand
        • DATABASE_NAME=fruit_stand
        • DATABASE_USER=guru
        • DATABASE_PASSWORD=badpass
        • DATABASE_ADMIN_PASSWORD=badidea
        • label app=guru-fruit
      4. Create the application using the saved file processed_template.yaml.

Task 10.

  1. Create the following directories inside your home directory:
    • logs/pod-fruit-stand
    • logs/pod-postgres
  2. Sync the directory /var/log from each running pod to previously created directories.
    • Put the logs from the fruit-stand application pod in logs/pod-fruit-stand
    • Put the logs from the postgresql application pod in logs/pod-postgres

Additional Resources

Logging In to the Lab Environment

Lab Objectives 1 and 2:

Log in to the server using the credentials provided:

ssh cloud_user@<PUBLIC_IP_ADDRESS>

Lab Objective 3:

Due to limitations in the A Cloud Guru Cloud Playground environment, we are unable to provide a hands-on experience for this portion of the exam.

  1. To complete this objective, you must first register for a Red Hat Developer login on the Red Hat login page.
  2. Once registered, you may complete the lab steps using Red Hat's CodeReady Containers or the Red Hat-provided OpenShift sandbox.

Solutions for using CodeReady Containers and the Red Hat OpenShift sandbox are available in this lab.


Practice Exam

In this practice exam, you will be presented with a series of tasks to complete. Some tasks require the successful completion of the previous tasks in order to complete them. Red Hat gives you 2 hours for the real exam. This practice exam will allow 3 hours for sufficient time for practice.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?