Skip to content

Instantly share code, notes, and snippets.

@shiopon01
Created June 21, 2019 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiopon01/72c52216af0c78c03803666292448188 to your computer and use it in GitHub Desktop.
Save shiopon01/72c52216af0c78c03803666292448188 to your computer and use it in GitHub Desktop.
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