Skip to content

Instantly share code, notes, and snippets.

@goyalmohit
Created January 6, 2019 21:35
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 goyalmohit/1c8231614796fcbaee4fcd6669935ddb to your computer and use it in GitHub Desktop.
Save goyalmohit/1c8231614796fcbaee4fcd6669935ddb to your computer and use it in GitHub Desktop.
Configure file to run VSTS agent on kubernetes cluster
apiVersion: v1
kind: ReplicationController
metadata:
name: vsts-agent
spec:
replicas: 1
template:
metadata:
labels:
app: vsts-agent
version: "0.1"
spec:
containers:
- name: vsts-agent
image: microsoft/vsts-agent:ubuntu-16.04-docker-18.06.1-ce-standard
env:
- name: VSTS_ACCOUNT
valueFrom:
secretKeyRef:
name: vsts
key: VSTS_ACCOUNT
- name: VSTS_TOKEN
valueFrom:
secretKeyRef:
name: vsts
key: VSTS_TOKEN
- name: VSTS_POOL
value: dockerized-vsts-agents
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-volume
volumes:
- name: docker-volume
hostPath:
path: /var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment