Add the kubernetes resources for webapp

This commit is contained in:
R. Tyler Croy 2017-07-22 23:10:41 -07:00
parent ec6c90ba84
commit 607bb095f0
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 51 additions and 0 deletions

51
k8s/webapp.yaml Normal file
View File

@ -0,0 +1,51 @@
---
# Based on
# https://radu-matei.github.io/blog/kubernetes-jenkins-azure/#configuring-jenkins-to-dinamically-spawn-agents-docker-containers-for-builds
#
# Thanks Radu!
apiVersion: "v1"
kind: "List"
items:
- apiVersion: "v1"
kind: "ReplicationController"
metadata:
name: 'webapp'
labels:
name: 'webapp'
spec:
replicas: 3
template:
metadata:
name: 'webapp'
labels:
name: 'webapp'
spec:
containers:
- name: 'webapp'
image: 'rtyler/codevalet-webapp:latest'
imagePullPolicy: Always
ports:
- containerPort: 9292
livenessProbe:
httpGet:
path: /
port: 9292
initialDelaySeconds: 30
timeoutSeconds: 3
- apiVersion: "v1"
kind: "Service"
metadata:
name: 'webapp'
spec:
type: 'LoadBalancer'
selector:
name: 'webapp'
ports:
-
name: "http"
port: 80
targetPort: 9292
protocol: "TCP"
# vim: ft=yaml