AnswerBun.com

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
metadata:
  name: jenkins-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jenkins
  template:
    metadata:
      labels:
        app: jenkins
    spec:
      containers:
      - name: jenkins
        image: aaa-aaa/jenkins.war.LTS.2.89.4
        ports:
          - containerPort: 8080
        volumeMounts:
          - name: jenkins-home
            mountPath: jenkins_home
      volumes:
        - 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

how to count number of file with a matching pattern using python

2  Asked on February 16, 2021 by suryansh-mathur

 

R First Row By Group When Condition Is Met

4  Asked on February 16, 2021 by bvowe

   

C++ program won’t print anything with vectors?

2  Asked on February 16, 2021 by luckylone-official

 

What is damping for?

3  Asked on February 16, 2021 by lix

       

Spring 5 MVC not finding mapping to controller returning JSON

2  Asked on February 16, 2021 by gary-kephart

   

Pointer value in c

3  Asked on February 15, 2021 by gsoap

 

Memory allocation of map[int]interface{} vs map[int]struct{}

2  Asked on February 15, 2021 by gabriel-gonzalez

   

Does the “leftmost prefix rule” of Index applies to SQL Server?

2  Asked on February 15, 2021 by drillfreak100

   

How to add ArrayList to JsonObject in Kotlin

2  Asked on February 15, 2021 by rajitha-perera

   

How to get data from axios request?

1  Asked on February 15, 2021 by theyaxxe

   

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP