Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
kubernetes-jenkins.yaml
# ------------------- Jenkins ReplicationController ------------------- #
apiVersion: v1
kind: ReplicationController
metadata:
name: jenkins
spec:
replicas: 1
selector:
app: jenkins-app
template:
metadata:
labels:
app: jenkins-app
spec:
# volumes:
# - name: jenkins-data
# hostPath:
# path: /app/jenkins
containers:
- name: jenkins-container
image: jenkins
ports:
- containerPort: 8080
# volumeMounts:
# - mountPath: /var/jenkins_home
# name: jenkins-data
---
# ------------------- Jenkins Service ------------------- #
kind: Service
apiVersion: v1
metadata:
name: jenkins-svc
spec:
type: NodePort
selector:
app: jenkins-app
ports:
- port: 8080
targetPort: 8080
nodePort: 30080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.