Introduction
In this challenge, you will be tasked with demonstrating your ability to deploy a basic web service in a local Kubernetes environment. You will be required to create and manage a simple pod using Minikube, a tool for running Kubernetes locally. The goal is to test your skills in creating a pod, verifying its deployment, and ensuring the pod is running the correct image and in the desired state.
Deploy Nginx Pod
As a new cloud engineer, you've been tasked with demonstrating your ability to deploy a basic web service in a local Kubernetes environment. This challenge will test your skills in creating and managing a simple pod using Minikube.
Tasks
- Create a pod named
web-serverusing thenginx:latestimage - Verify that the pod is running in the default namespace
- Ensure the pod is successfully deployed and ready to serve web content
Requirements
- Use
kubectlto create the pod - Name the pod exactly
web-server - Use the
nginx:latestimage for the pod - Deploy the pod in the default namespace
- Ensure the pod is in a
Runningstate - Work within the
~/projectdirectory
Examples
Example of a successful pod deployment:
NAME READY STATUS RESTARTS AGE
web-server 1/1 Running 0 30s
Hints
- Use
minikube startto start a Kubernetes cluster - You can create the pod in two ways:
- Using imperative commands with
kubectl run(research the parameters needed) - Using a YAML file:
- Research the basic structure for a Pod YAML definition
- Remember to include apiVersion, kind, metadata and spec sections
- Your pod should be named exactly as specified in the requirements
- Consider what container settings you need to include
- Using imperative commands with
- Check the pod status using
kubectl get pods - If you encounter issues, use
kubectl describe pod web-serverfor more information - Ensure Minikube is running before creating the pod
Summary
In summary, this challenge requires you to create a pod named web-server using the nginx:latest image, and then verify that the pod is running in the default namespace and is in a Running state. You will need to use kubectl commands to create and manage the pod, and ensure that it meets the specified requirements.


