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
ubuntu@ip-172-31-42-113:/etc/nginx/sites-enabled$ ls
apilb
ubuntu@ip-172-31-42-113:/etc/nginx/sites-enabled$ cat apilb
upstream target_service {
server 172.31.38.154:6443;
server 172.31.19.2:6443;
}
@CalvinHartwell
CalvinHartwell / cdk-aws-prod-bundle.yaml
Last active September 6, 2018 14:50
cdk-aws-prod-bundle.yaml
:series: xenial
description: A nine-machine Kubernetes cluster, appropriate for production. Includes a three-machine etcd cluster and three Kubernetes worker nodes.
services:
ceph-mon:
annotations:
gui-x: '600'
gui-y: '300'
charm: cs:ceph-mon
num_units: 3
to:
@CalvinHartwell
CalvinHartwell / kubectl-cheat-sheet.yaml
Created September 3, 2018 23:50
kubectl cheat sheet command list
# Delete all pods stuck in Pending, useful if you cannot pull a specific image.
kubectl get pods --all-namespaces | grep Pending | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@CalvinHartwell
CalvinHartwell / prometheus-unhappy.yaml
Created August 28, 2018 01:15
prometheus-unhappy.yaml
:series: xenial
description: A nine-machine Kubernetes cluster, appropriate for production. Includes a three-machine etcd cluster and three Kubernetes worker nodes.
services:
ceph-mon:
annotations:
gui-x: '600'
gui-y: '300'
charm: cs:ceph-mon
num_units: 3
to:
@CalvinHartwell
CalvinHartwell / asseco-cdk-1.12-beta-vsphere-plugin.yaml
Created August 21, 2018 21:00
asseco-cdk-1.12-beta-vsphere-plugin
:series: xenial
description: A nine-machine Kubernetes cluster, appropriate for production. Includes a three-machine etcd cluster and three Kubernetes worker nodes.
services:
ceph-mon:
annotations:
gui-x: '600'
gui-y: '300'
charm: cs:ceph-mon
num_units: 3
to:
@CalvinHartwell
CalvinHartwell / cdk-ericsson-demo.yaml
Last active August 17, 2018 03:22
cdk-ericsson-demo.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: ericsson
name: ericsson
spec:
replicas: 3
selector:
apiVersion: v1
kind: Namespace
metadata:
name: rancher
labels:
name: rancher
---
kind: ServiceAccount
apiVersion: v1
metadata:
series: xenial
description: A nine-machine Kubernetes cluster, appropriate for production. Includes a three-machine etcd cluster and three Kubernetes worker nodes.
services:
calico:
annotations:
gui-x: '450'
gui-y: '750'
charm: cs:~containers/calico-47
options:
calico-policy-image: "quay.io/calico/kube-controllers:v1.0.4"
@CalvinHartwell
CalvinHartwell / canonical-kubernetes-offline-install.sh
Last active August 1, 2018 16:41
canonical-kubernetes-offline-install.sh
#!/usr/bin/env bash
echo "Installing Missing Packages"
sudo apt update && sudo apt install -y simplestreams apache2 apt-mirror git docker.io python3-pip unzip
sudo pip3 install pyyaml
sudo pip3 install pyaml
sudo snap install kubectl --classic
sudo apt-get install juju -y
echo "Writing Config Files"
@CalvinHartwell
CalvinHartwell / cdk-rancher2-rbac-ingress.yaml
Last active June 27, 2018 22:13
Canonical Kubernetes Rancher 2.0 with RBAC, CANAL and Ingress Rule
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-admin
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef: