Skip to content

Instantly share code, notes, and snippets.

@tomkukral
Created September 5, 2017 13:24
Show Gist options
  • Select an option

  • Save tomkukral/afcb64359f9c87bb7f625f520222de51 to your computer and use it in GitHub Desktop.

Select an option

Save tomkukral/afcb64359f9c87bb7f625f520222de51 to your computer and use it in GitHub Desktop.
Jenkins in Kubernetes
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: jenkins
namespace: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: jenkins
spec:
nodeSelector:
kubernetes.io/hostname: ctl01
containers:
- name: jenkins
image: tcpcloud/jenkins
ports:
- containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
name: jenkins
namespace: jenkins
spec:
selector:
app: jenkins
type: NodePort
ports:
- protocol: TCP
port: 80
targetPort: 8080
nodePort: 30333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment