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 / 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 / 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 / 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 / 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 / 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 / rancher.yaml
Last active February 8, 2018 13:50
cdk-rancher.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: rancher
name: rancher
spec:
replicas: 1
selector:
@CalvinHartwell
CalvinHartwell / cdk-rancher.md
Last active February 8, 2018 13:48
Running Rancher with Canonical Kubernetes (CDK) or another existing Kubernetes Cluster

Rancher on Canonical's Distribution of Kubernetes (CDK)

This document describes how to deploy Rancher and import an existing Kubernetes cluster. In our case, we assume you have already deployed CDK, Canonical's Kubernetes Distribution Running on Ubuntu. This can be on AWS, VMware, OpenStack, Azure or on bare metal.

If you run into issues or need support please comment on this Gist and email calvin.hartwell@canonical.com.

Install and deploy Canonical Kubernetes using Juju

@CalvinHartwell
CalvinHartwell / cdk-helm.md
Last active February 9, 2018 10:37
Running Helm with Canonical Kubernetes (CDK) or another existing Kubernetes Cluster

Helm on Canonical's Distribution of Kubernetes (CDK)

... WIP

1 generic_controller.go:191] NodeController ip-172-31-24-113 [nodesEndpointsController] failed with : Operation cannot be fulfilled on nodes "ip-172-31-24-113": the object has been modified; please apply your changes to the latest version and try again
E0211 23:16:59.590559 1 generic_controller.go:191] ClusterController local [cluster-stats] failed with : Operation cannot be fulfilled on clusters.management.cattle.io "local": the object has been modified; please apply your changes to the latest version and try again
E0211 23:16:59.643101 1 generic_controller.go:191] ClusterController local [cluster-stats] failed with : Operation cannot be fulfilled on clusters.management.cattle.io "local": the object has been modified; please apply your changes to the latest version and try again
...[omitted]...
E0211 23:18:39.937192 1 streamwatcher.go:109] Unable to decode an event from the watch stream: stream error: stream ID 139; INTERNAL_ERROR
E0211 23:18:39.937192 1 streamwatcher.go:109] Un