Skip to content

Instantly share code, notes, and snippets.

@kassanmoor
kassanmoor / k8s-dashboard-nodeport-service.yaml
Last active April 16, 2018 02:42
Expose dashboard K8 for mac/windows
kind: Service
apiVersion: v1
metadata:
name: kubernetes-dashboard-nodeport
namespace: kube-system
labels:
k8s-app: kubernetes-dashboard
spec:
type: NodePort
sessionAffinity: None
@kassanmoor
kassanmoor / run.tpl
Created November 24, 2017 21:32 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name={{.Name}} \
{{range $e := .Config.Env}}--env="{{$e}}" \
{{end}}{{range $p, $conf := .NetworkSettings.Ports}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \
{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from="{{.}}" \
{{end}}{{range $v := .HostConfig.Binds}}--volume="{{.}}" \
{{end}}{{range $l, $v := .Config.Labels}}--label "{{$l}}"="{{$v}}" \
{{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{.}} \
{{end}}{{range $v := .HostConfig.CapDrop}}--cap-drop {{.}} \
{{end}}{{range $d := .HostConfig.Devices}}--device={{(index $d).PathOnHost}}:{{(index $d).PathInContainer}}:{{(index $d).CgroupPermissions}} \
@kassanmoor
kassanmoor / deploy.md
Created June 1, 2017 22:07 — forked from marcoceppi/deploy.md
Mult-node manual deployment

Overture

This is a means to get a cluster running on a handful of machines. It's a very bespoke way to craft a deployment and trades a lot of automation features for the ability to deploy kubernetes /literally/ anywhere Ubuntu is running. As this is a manual deployment, we can't directly use conjure-up. We'll have to dip down into the lower level tooling and use Juju directly.

Prerequisites

You will need at least three VMs running Ubuntu 16.04. The size of the VM is up to you but 2 vcpu 4 gb

Name : Sam
Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw==