Skip to content

Instantly share code, notes, and snippets.

😀
Happy as

Lachlan Evenson lachie83

😀
Happy as
Block or report user

Report or block lachie83

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jenkins-service-account
kubectl -n kube-system create sa jenkins
kubectl create clusterrolebinding jenkins --clusterrole cluster-admin --serviceaccount=<namespace>:jenkins
@lachie83
lachie83 / helm-init-wo-network.md
Last active Jul 11, 2018
Discribes status when running helm init on a cluster without networking setup
View helm-init-wo-network.md
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
View azure-k8s-1-6-pv-error.md

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
View keybase.md

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:

@lachie83
lachie83 / 15 minutes with Docker Swarm Mode.md
Last active Feb 20, 2018
15 minutes with Docker Swarm Mode
View 15 minutes with Docker Swarm Mode.md

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 
@lachie83
lachie83 / gist:bfe4a7d3c7a6d3430753
Last active Aug 23, 2018
K8s NodeSelector usage
View gist:bfe4a7d3c7a6d3430753
# 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
You can’t perform that action at this time.