Skip to content

Instantly share code, notes, and snippets.

@mak3r
mak3r / Vagrantfile.kubectl.version
Last active August 16, 2018 19:11
Get a VM with a specific version of the kubectl client.
# encoding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
#put <<FYI
# create a virtualbox vm with the latest version of kubectl
# vagrant up
# create a virtualbox vm with a specific version of kubectl
# KUBECTL_VER=v1.9.7 vagrant up
#FYI
@mak3r
mak3r / Dockerfile.kubectl.version
Created August 20, 2018 20:11
Fire up a docker container with a specific kubectl version
FROM ubuntu:18.04
# default kubectl version is current stable
# override this when building the container to use a different version
ARG KUBECTL_VER='$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)'
WORKDIR /app
# include my kubeconfig in the container
COPY kubeconfig /app/kubeconfig
@mak3r
mak3r / upgrade.sh
Created November 15, 2018 21:05
Rancher v2.x single node upgrade
#!/bin/bash
# based on
# https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/
RANCHER_CONTAINER_NAME=$1
RANCHER_CONTAINER_TAG=$2
RANCHER_VERSION=$3
RANCHER_UPGRADE_VERSION=$4
@mak3r
mak3r / Rancher_2_air-gap_install.md
Last active March 8, 2022 00:16
Notes and comments on installing rancher 2 in an air-gap environment
@mak3r
mak3r / Demo.md
Last active July 11, 2019 20:04
Demo for DevNation Federal 2019 conference

Prep

  1. Generate a list of instances
  • sbin/generate-instance-list.sh -n mak3r-rancher-training-k3s > instance-ids.json
  • use a script to connect to those instances by list id
    • sbin/ssh-connect.sh -i 0 -k ~/.ssh/mak3r-private.pem -s
  1. Get the cloud server public IP address and replace throughout the script
  2. Prepare a local RPi server

@mak3r
mak3r / k3s-training.md
Last active April 11, 2022 16:03
Process notes for k3s online training

Prep

  1. Generate a list of instances
  • sbin/generate-instance-list.sh -n mak3r-rancher-training-k3s > instance-ids.json
  • use a script to connect to those instances by list id
    • sbin/ssh-connect.sh -i 0 -k ~/.ssh/mak3r-private.pem -s
  1. Get the cloud server public IP address and replace throughout the script
  2. Prepare a local RPi server

@mak3r
mak3r / README.md
Last active July 9, 2019 04:22
Find a list of aws instances based on their tag "Name"

Access aws instances easily even after dns name changes

Restarts of aws ec2 instances can cause ips and dns names to change if you don't pay for static IPs

This set of scripts enables quick ssh access to a group of similarly named machines

  1. run generate-instance-list.sh to get a list of aws instance ids
  2. run ssh-connect.sh against the generated list to access any of the instances

TODO

Currently it is not possible to differentiate the machines easily - enable access by more human readable names in the generated instance list.

@mak3r
mak3r / K3os-packer-vagrant-virtualbox.md
Last active January 30, 2023 15:59
Build and run k3os using packer, vagrant and virtualbox

Packer and Vagrant resources to build k3os in VirtualBox

Requirements

  • packer
  • vagrant
  • virtualbox

Build and Run

  1. packer build k3os.json
  2. vagrant up
@mak3r
mak3r / arm-techcon-2019.md
Last active October 8, 2019 04:29
Command line process for demo at Arm TechCon 2019
@mak3r
mak3r / Stop and Remove all running docker containers
Created January 15, 2020 15:20
Stop and Remove all running docker containers
for i in $(docker ps | cut -f 1 -d " " | grep -v CONTAINER); do docker stop $i; docker rm $i; done