Skip to content

Instantly share code, notes, and snippets.

View lachie83's full-sized avatar
😀
Happy as

Lachlan Evenson lachie83

😀
Happy as
View GitHub Profile
@lachie83
lachie83 / gist:bfe4a7d3c7a6d3430753
Last active August 23, 2018 07:36
K8s NodeSelector usage
# List running nodes
docker run -it --rm --volumes-from data levenson/kubectl get nodes
NAME LABELS STATUS
10.161.34.62 kubernetes.io/hostname=10.161.34.62 Ready
10.161.34.65 kubernetes.io/hostname=10.161.34.65 Ready
10.161.34.70 kubernetes.io/hostname=10.161.34.70 Ready
# Label nodes with name key
docker run -it --rm --volumes-from data levenson/kubectl label nodes 10.161.34.62 name=node-1
@lachie83
lachie83 / 15 minutes with Docker Swarm Mode.md
Last active February 20, 2018 23:53
15 minutes with Docker Swarm Mode

3 x Cluster on AWS

  • manager1
  • worker1
  • worker2

Docker-machine commands

Use docker-machine to lay down 3 x hosts on AWS using docker-engine 1.12

docker-machine create --driver amazonec2  --amazonec2-private-address-only --engine-install-url https://test.docker.com/ levenson-docker-swarm-manager1 
docker-machine create --driver amazonec2  --amazonec2-private-address-only --engine-install-url https://test.docker.com/ levenson-docker-swarm-worker1 

Keybase proof

I hereby claim:

  • I am lachie83 on github.
  • I am levo (https://keybase.io/levo) on keybase.
  • I have a public key ASC69tehMsOM78DsEmQiHlih20Rgt9Mpegf-iDmlI1iBFwo

To claim this, I am signing this object:

Error Message

MountVolume.SetUp failed for volume "kubernetes.io/azure-disk/889cb7d1-34f6-11e7-bda0-000d3a19697d-pvc-88904331-34f6-11e7-bda0-000d3a19697d" (spec.Name: "pvc-88904331-34f6-11e7-bda0-000d3a19697d") pod "889cb7d1-34f6-11e7-bda0-000d3a19697d" (UID: "889cb7d1-34f6-11e7-bda0-000d3a19697d") with: mount failed: exit status 32

Details

kubectl describe po/<podname>
<snip>
Events:
  FirstSeen	LastSeen	Count	From					SubObjectPath	Type		Reason			Message
@lachie83
lachie83 / helm-init-wo-network.md
Last active July 11, 2018 20:41
Discribes status when running helm init on a cluster without networking setup
moby-025000000007:/# kubectl get nodes
NAME                STATUS     AGE       VERSION
moby-025000000007   NotReady   50s       v1.6.2
moby-025000000008   NotReady   13s       v1.6.2
moby-025000000007:/# helm init --net-host
Creating /root/.helm
kubectl -n kube-system create sa jenkins
kubectl create clusterrolebinding jenkins --clusterrole cluster-admin --serviceaccount=<namespace>:jenkins
@lachie83
lachie83 / references.md
Last active January 5, 2024 00:03
The Hitchhiker's Guide to Pod Security References