Skip to content

Instantly share code, notes, and snippets.

View rrichards's full-sized avatar
💭
Rocking the CLI

Ryan Richards rrichards

💭
Rocking the CLI
  • R3 Technologies, Inc.
  • Edmond, OK
  • 13:36 (UTC -12:00)
  • X @rrichards
View GitHub Profile
@rrichards
rrichards / docker_desc.sh
Created July 19, 2018 17:47 — forked from mlinhard/docker_desc.sh
Shell script to find docker image descendants
#!/bin/bash
parent_short_id=$1
parent_id=`docker inspect --format '{{.Id}}' $1`
get_kids() {
local parent_id=$1
docker inspect --format='ID {{.Id}} PAR {{.Parent}}' $(docker images -a -q) | grep "PAR ${parent_id}" | sed -E "s/ID ([^ ]*) PAR ([^ ]*)/\1/g"
}
print_kids() {
@rrichards
rrichards / docker_descendants.py
Created July 19, 2018 17:44 — forked from altaurog/docker_descendants.py
Python3 script to find descendants of one or more docker images
#!/usr/bin/python3
#
# usage: python3 docker_descendants.py <image_id> ...
import sys
from subprocess import check_output
def main(images):
image_ids = set(images)
######################
# Create The Cluster #
######################
# Open Docker Preferences, select the Kubernetes tab, and select the "Enable Kubernetes" checkbox
# Open Docker Preferences, select the Advanced tab, set CPUs to 2, and Memory to 2.0
# Make sure that your current kubectl context is pointing to your Docker for Mac/Windows cluster
######################
# Create The Cluster #
######################
# Make sure that your minikube version is v0.26 or higher
minikube start \
--vm-driver virtualbox \
--cpus 2 \
--memory 2048
######################
# Create The Cluster #
######################
# Make sure that your kops version is v1.9 or higher.
# Make sure that all the prerequisites described in the "Appendix A" are met.
# Do not run the commands from below if you are a **Windows** user. You'll have to follow the instructions from the Appendix B instead.
######################
# Create The Cluster #
######################
# Make sure that your minishift version is v1.15 or higher
minishift start \
--vm-driver virtualbox \
--cpus 2 \
--memory 2048 \
@rrichards
rrichards / gke.sh
Created May 29, 2018 00:48 — forked from vfarcic/gke.sh
######################
# Create The Cluster #
######################
gcloud auth login
gcloud auth application-default login
ZONE=$(gcloud compute zones list \
--filter "region:(us-east1)" \
FROM mirror-hub.docker.tech.lastmile.com/alpine:3.5
RUN apk add --no-cache curl jq
RUN curl -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.5.3/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl
COPY rmpeers /
CMD ["/rmpeers"]
@rrichards
rrichards / K8s-DigitalOcean-CoreOS.md
Created May 20, 2018 07:45 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
@rrichards
rrichards / helm-cheatsheet.md
Created March 16, 2018 04:24 — forked from tuannvm/argo.md
#Helm #Kubernetes #cheatsheet, happy helming!