Question : The Nautilus DevOps team is working on a Kubernetes template to deploy a web application on the cluster. There are some requirements to create/use persistent volumes to store the application code, and the template needs to be designed accordingly. Please find more details below:
Create a
PersistentVolume
named aspv-devops
. Configure thespec
as storage class should bemanual
, set capacity to4Gi
, set access mode toReadWriteOnce
, volume type should behostPath
and set path to/mnt/security
(this directory is already created, you might not be able to access it directly, so you need not to worry about it).Create a
PersistentVolumeClaim
named aspvc-devops
. Configure thespec
as storage class should bemanual
, request3Gi
of the storage, set access mode toReadWriteOnce
.Create a
pod
named aspod-devops
, mount the persistent volume you created with claim namepvc-devops
at document root of the web server, the container within the pod should be named ascontainer-devops
using imagehttpd
withlatest
tag only (remember to mention the tag i.ehttpd:latest
).Create a node port type service named
web-devops
using node port30008
to expose the web server running within the pod.
Note:
The kubectl
utility on jump_host
has been configured to work with the kubernetes cluster.
1. At first kubectl utility configure and working from jump server, run below commands
kubectl get services
kubectl get pods
https://gitlab.com/nb-tech-support/devops.git
( Refer Below Video for more clarity )
kubectl get pods
6. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
0 Comments