Kubernetes - How to run local image of jenkins

Stack Overflow Asked by jerome12 on November 8, 2020

I have config file like this :

apiVersion: apps/v1
kind: Deployment
  name: jenkins-deployment
  replicas: 1
      app: jenkins
        app: jenkins
      - name: jenkins
        image: aaa-aaa/jenkins.war.LTS.2.89.4
          - containerPort: 8080
          - name: jenkins-home
            mountPath: jenkins_home
        - name: jenkins-home
          emptyDir: {}

I have in same directory of this config file, an image of jenkins : jenkins.war.LTS.2.89.4

How can I deploy with using this image ?

One Answer

You can not run a war file of Jenkins directly on kubernetes. You need to create a docker image of that war file to be able to run it on kubernetes.

Follow this guide to create a docker image of the war file.

Once you have a docker image you can push that image to a remote or local and private or public docker registry and refer that url in the kubernetes deployment yaml in image section.

Also I would suggest to use helm chart of Jenkins to deploy Jenkins on kubernetes.

Correct answer by Arghya Sadhu on November 8, 2020

Add your own answers!

Related Questions

Why are declarations in a switch construct legal?

1  Asked on November 12, 2021 by l-s-roth


How do I import InvalidURL exception in praw for python?

1  Asked on November 12, 2021 by johannes-pertl


Place button on bottom of a div

7  Asked on November 12, 2021 by jackal


Javascript: using tuples as dictionary keys

4  Asked on November 12, 2021 by hasen


Gmail REST api batch support for getting messages

3  Asked on November 12, 2021 by dune76


Custom Route Doesn’t Get The Query String

2  Asked on November 12, 2021 by at-2017


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir