Created
June 21, 2019 05:59
-
-
Save shiopon01/72c52216af0c78c03803666292448188 to your computer and use it in GitHub Desktop.
kubernetes-jenkins.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- 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