Skip to content

Instantly share code, notes, and snippets.

@rohancme
Last active July 15, 2017 03:07
Show Gist options
  • Save rohancme/4bd7128669199e8d940efc720e9bc560 to your computer and use it in GitHub Desktop.
Save rohancme/4bd7128669199e8d940efc720e9bc560 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins-slave-ubuntu
namespace: ci
spec:
template:
metadata:
labels:
name: jenkins-slave-ubuntu
spec:
containers:
- name: jenkins-slave-ubuntu
image: [YOUR IMAGE HERE]
ports:
- containerPort: 8080
- containerPort: 50000
nodeSelector:
beta.kubernetes.io/os: linux
---
apiVersion: v1
kind: Service
metadata:
name: jenkins-ubuntu-agent
namespace: ci
spec:
ports:
- port: 8080
name: http
targetPort: 8080
- port: 50000
name: jenkins-slave
targetPort: 50000
selector:
name: jenkins-slave-ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment