0% found this document useful (0 votes)
18 views7 pages

Deploy Web App on Kubernetes with Minikube

This document outlines the steps to deploy a web application using Kubernetes on a local Minikube cluster. It includes instructions for starting Minikube, applying namespace configurations, deploying resources, and checking the status of pods and services. The final step involves accessing and verifying the deployed application through a provided URL.

Uploaded by

SATHEESH K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views7 pages

Deploy Web App on Kubernetes with Minikube

This document outlines the steps to deploy a web application using Kubernetes on a local Minikube cluster. It includes instructions for starting Minikube, applying namespace configurations, deploying resources, and checking the status of pods and services. The final step involves accessing and verifying the deployed application through a provided URL.

Uploaded by

SATHEESH K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Deploying a Web Application Using Kubernetes

In this assignment, we will deploy a web application using Kubernetes on a


local Minikube cluster. This setup will allow us to run and manage
containerized applications efficiently.

Steps to Deploy the Web Application


Step 1: Start Minikube
We need to start Minikube, which will set up a local Kubernetes cluster.
Run the following command in your terminal:
minikube start
This will initialize the Kubernetes cluster on your local system.

Step 2: Navigate to the Deployment Directory


Now, move to the directory where your YAML configuration files are stored.
cd
~/Devops/kubernetes/deploy/yaml/apache_phpadmin_mysql/PHPMYAD
MIN_MYSQL
This directory contains the Kubernetes configuration files needed for
deployment.

Step 3: Apply Namespace


Namespaces in Kubernetes help in organizing different resources. We will
apply the namespace configuration to create a new namespace for our
deployment.
kubectl apply -f [Link]
This will create a namespace lampdemo where our resources will be
deployed.
Step 4: Deploy Resources in the Namespace
Now, deploy all the required resources in the lampdemo namespace using
kubectl apply.
kubectl apply -n lampdemo -k ./
This command applies all the YAML configuration files present in the current
directory. It deploys Apache, PHPMyAdmin, and MySQL services.

Step 5: Check the Status of Pods


To ensure everything is running correctly, check the status of the pods in the
lampdemo namespace.

kubectl get po -n lampdemo


This will display a list of running pods. Each pod should have a Running
status.

Step 6: Check Services


Next, we check the services running in the lampdemo namespace.
kubectl get svc -n lampdemo
This will show details such as service name, type, external IP, and ports
needed to access the application.

Step 7: Access the Service


To access the deployed application, use the Minikube service command.
minikube service lamp -n lampdemo
This command will open the application in your browser or provide the URL
where the service is running.
Step 8: Verify the Deployment
Finally, verify if the web application is accessible by visiting the provided URL
(e.g., [Link]
You should see your web application running successfully.

You might also like