Non-persisting State
Learn how to 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 look at the jenkins.yml
definition:
Press + to interact
apiVersion: networking.k8s.io/v1kind: 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: /jenkinspathType: ImplementationSpecificbackend:service:name: jenkinsport:number: 8080---apiVersion: apps/v1kind: 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 time with it. Instead, we’ll move on and create the objects.
Creating the objects
It’s ...
Access this course and 1400+ top-rated courses and projects.