Answer for Kodekloud DEVOPS Questions-Kubernetes Shared Volumes

 Question: Read the full details of your question. 

sample Answer:

# first we need to create a YAML file based on the given details in the question.

check below the Github link for the sample YAML file for this task.( share-volume-pod.yaml) 



#Hope you prepared the YAML file from the above step using your question details.
NOW let's do the task.

  # pod creation 
    
    kubectl apply -f <your.yaml file> 

# login to 1 container and create a file in container 1

   echo 'Welcome to xFusionCorp Industries!' > tmp/beta/beta.text

#now login to check in another container location that beta. text is presented 

    cd /tmp/apps/ 


Note: Commands are correct but based on your question the server, user name, and other details might differ, so please do check.

check the below video too for how to do this task (i have done a sample task on Ubuntu OS)


*Please comment on this post if you have any questions or facing any issues in the above steps, also provide your feedback in the comments :)

1 comment:

Featured Post

Answer for Kodekloud DEVOPS Questions - Init container in Kubernetes

Question: 1. Create a Deployment named as ic-deploy-devops. 2. Configure spec as replicas should be 1 , labels app should be ic-devops , ...