Skip to content

Instantly share code, notes, and snippets.

@DazWilkin
DazWilkin / deployment-statefulset.yaml
Last active August 16, 2018 20:15
Kubernetes Engine from scratch #2
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
project: knowingnode
component: frontend
controlling: statefulset
name: knowingnode-statefulset
spec:
replicas: 3
@DazWilkin
DazWilkin / statefulset.yaml
Last active August 16, 2018 19:53
Kubernetes Engine from scratch #2
---
apiVersion: v1
kind: Service
metadata:
labels:
project: knowingnode
component: backend
name: sknowingnode
spec:
clusterIP: None
@DazWilkin
DazWilkin / deployment-daemonset.yaml
Created August 16, 2018 19:19
Kubernetes Engine from scratch #2
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
project: knowingnode
component: frontend
controlling: daemonset
name: knowingnode-daemonset
spec:
replicas: 3
@DazWilkin
DazWilkin / daemonset-service.yaml
Last active August 16, 2018 19:50
Kubernetes Engine from scratch #2
apiVersion: v1
kind: Service
metadata:
labels:
project: knowingnode
component: backend
name: knowingnoded
spec:
clusterIP: None
ports:
@DazWilkin
DazWilkin / daemonset.yaml
Created August 16, 2018 18:39
Kubernetes Engine from scratch #2
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
project: knowingnode
component: backend
name: knowingnoded
spec:
selector:
matchLabels:
@DazWilkin
DazWilkin / deployment-deployment.yaml
Created August 16, 2018 18:16
Kubernetes Engine from scratch #2
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
project: knowingnode
component: frontend
controlling: deployment
name: knowingnode-deployment
spec:
replicas: 3
@DazWilkin
DazWilkin / service.yaml
Created August 16, 2018 17:16
Kubernetes Engine from scratch #2
apiVersion: v1
kind: Service
metadata:
labels:
run: knowingnode
name: knowingnode
spec:
ports:
- name: http
protocol: TCP
@DazWilkin
DazWilkin / deployment.yaml
Created August 16, 2018 17:01
Kubernetes Engine from scratch #2
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: knowingnode
name: knowingnode
spec:
replicas: 3
selector:
matchLabels:
@DazWilkin
DazWilkin / Dockerfile
Last active August 16, 2018 17:00
Kubernetes Engine from sratch #2
FROM golang:1.10-stretch as build
WORKDIR /go/src/app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/app/main .
FROM scratch
LABEL maintainer="Your Name <[email protected]"
@DazWilkin
DazWilkin / statefulset.yaml
Last active August 15, 2018 14:54
Kubernetes Engine from scratch
---
apiVersion: v1
kind: Service
metadata:
labels:
run: kuard
name: skuard
spec:
clusterIP: None
ports: