Non-Persisting State
In this lesson, we will deploy Jenkins and analyze its state.
Deploying Jenkins
This time we’ll deploy Jenkins and see what challenges we will face.
Looking into the Definition
Let’s take a look at the volume/jenkins.yml
definition.
cat volume/jenkins.yml
The output is as follows.
apiVersion: extensions/v1beta1kind: Ingressmetadata:name: jenkinsannotations:kubernetes.io/ingress.class: "nginx"ingress.kubernetes.io/ssl-redirect: "false"nginx.ingress.kubernetes.io/ssl-redirect: "false"spec:rules:- http:paths:- path: /jenkinsbackend:serviceName: jenkinsservicePort: 8080---apiVersion: apps/v1beta2kind: Deploymentmetadata:name: jenkinsspec:selector:matchLabels:type: masterservice: jenkinsstrategy:type: Recreatetemplate:metadata:labels:type: masterservice: jenkinsspec:containers:- name: jenkinsimage: vfarcic/jenkinsenv:- name: JENKINS_OPTSvalue: --prefix=/jenkins---apiVersion: v1kind: Servicemetadata:name: jenkinsspec:ports:- port: 8080selector:type: masterservice: jenkins
There’s nothing special in that YAML file. It defines an Ingress with /jenkins
path, a Deployment, and a Service. We won’t waste ...
Access this course and 1500+ top-rated courses and projects.