Skip to content

Instantly share code, notes, and snippets.

View CalvinHartwell's full-sized avatar
💭
Delivering Kubernetes!

Calvin Hartwell CalvinHartwell

💭
Delivering Kubernetes!
View GitHub Profile
@CalvinHartwell
CalvinHartwell / resource.yaml
Created February 8, 2018 01:54
k8s-third-party-resource
Third party resource example:
cat resource.yaml
metadata:
name: custom-resource.example.com
apiVersion: extensions/v1beta1
kind: ThirdPartyResource
description: “A custom resource”
versions:
name: v1
@CalvinHartwell
CalvinHartwell / k8s-pod-affinity.yaml
Created February 8, 2018 00:57
k8s-pod-affinity-rules
...pod webserver
$ cat webserver.yaml
apiVersion: v1
kind: Pod
metadata:
name: webserver
labels:
appname: "webapp"
spec:
@CalvinHartwell
CalvinHartwell / node-affinity-rule-k8s.yaml
Created February 8, 2018 00:27
node-affinity-rule-k8s
...pod spec....
metadata:
name: microbot
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
matchExpressions:
-key: foo
@CalvinHartwell
CalvinHartwell / microbotv1-nfs.yaml
Created February 7, 2018 15:36
microbotv1-nfs.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: microbot-nfs
name: microbot-nfs
spec:
replicas: 5
selector:
@CalvinHartwell
CalvinHartwell / microbotv1-nfs.yaml
Created February 7, 2018 15:36
microbotv1-nfs.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: microbot-nfs
name: microbot-nfs
spec:
replicas: 5
selector:
@CalvinHartwell
CalvinHartwell / nfs-pvc.yaml
Created February 7, 2018 14:58
nfs-persistent-volume-claim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-claim-1
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
@CalvinHartwell
CalvinHartwell / nfs.yaml
Created February 7, 2018 14:55
nfs-k8s-persistant-volume
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-1
spec:
capacity:
storage: 5Mi
accessModes:
- ReadWriteMany
@CalvinHartwell
CalvinHartwell / microbotv1
Last active February 8, 2018 09:39
Microbot v1 with ingress
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: microbot-v1
name: microbot-v1
spec:
replicas: 5
selector:
@CalvinHartwell
CalvinHartwell / secrets.yaml
Created February 6, 2018 23:45
Kubernetes Secrets Example
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
username: YWRtaW4=
password: MWYyZDFlMmU2N2Rm
@CalvinHartwell
CalvinHartwell / game.properties
Created February 6, 2018 23:26
kubernetes context maps example
game.properties: |
enemies=aliens
lives=3
enemies.cheat=true
enemies.cheat.level=noGoodRotten
secret.code.passphrase=UUDDLRLRBABAS
secret.code.allowed=true
secret.code.lives=30