Persisting State through the emptyDir Volume Type
In this lesson, we will analyze the state of an updated Jenkins Deployment and discuss emptyDir Volume type.
Updating the Jenkins Deployment Definition
Let’s take a look at a slightly updated YAML definition.
Press + to interact
cat volume/jenkins-empty-dir.yml
The output, limited to the relevant parts, is as follows.
Press + to interact
...kind: Deployment...spec:...template:...spec:containers:...volumeMounts:- mountPath: /var/jenkins_homename: jenkins-homevolumes:- emptyDir: {}name: jenkins-home...
We added a mount that references the jenkins-home
Volume. The Volume type is, this time, emptyDir
. We’ll discuss the new Volume type soon. But, before we dive into explanations, we’ll try to experience its effects.
Press + to interact
kubectl apply \-f volume/jenkins-empty-dir.ymlkubectl rollout status deploy jenkins
We applied the new definition and waited until the rollout finished.
Now we can open the New Job Jenkins screen and repeat the same process we followed before.
Press + to interact
open "http://$(minikube ip)/jenkins/newJob"
Please type test in the ...
Access this course and 1400+ top-rated courses and projects.