Mac friendly. Probably not Linux friendly. Throughout the course of these commands, feel free to check out the contents of the yaml files you apply with kubectl.
Get eksctl
brew tap weaveworks/tap
brew install weaveworks/tap/eksctl
# Use discrete kubeconfig files | |
update_kubeconfig () { | |
KUBECONFIG=$HOME/.kube/config | |
for f in $HOME/.kube/config.d/*; do | |
KUBECONFIG=$KUBECONFIG:$f | |
done | |
export KUBECONFIG | |
} | |
update_kubeconfig |
#!/bin/bash | |
if [ "$(uname -s)" == "Darwin" ]; then | |
b64="base64 -D" | |
else | |
b64="base64" | |
fi | |
project_name=$1 |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
app: ssh-cheat | |
name: ssh-cheat | |
namespace: kube-system | |
spec: | |
containers: | |
- command: |
#!/usr/bin/env ruby | |
require 'magic_cloud' | |
name = ARGV[0] | |
major = ARGV[1] | |
minor = ARGV[2] | |
angles = [350, 260, 80] | |
words = Array.new |
--- | |
- hosts: localhost | |
vars: | |
ansible_connection: local | |
tasks: | |
- name: demo an untagged task | |
debug: | |
msg: I am an untagged task | |
- name: demo a normal tagged task |
#!/bin/bash | |
for vm in $(govc find -i=true / -type m); do | |
govc object.collect -json=true $vm config | jq -r '.[] | select(.Val.Hardware.Device[].MacAddress == "00:50:56:b4:0a:1b") | .Val.Name' | |
govc object.collect -json=true $vm config | jq -r '.[] | select(.Val.Hardware.Device[].MacAddress == "00:50:56:b7:06:6f") | .Val.Name' | |
done |
{ | |
"Version": "2012-10-17", | |
"Id": "Policy1547233271159", | |
"Statement": [ | |
{ | |
"Sid": "Allow-non-prod-to-list-bucket-objects", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::222222222222:root" | |
}, |
#!/bin/bash | |
country=${country:=US} | |
state=${state:=Indiana} | |
city=${city:=Carmel} | |
if [ ! -d ca ]; then | |
mkdir ca | |
fi |
#!/usr/local/bin/bash | |
pfx=$(basename $0) | |
tempdir=$(mktemp -d /tmp/$pfx.$$) | |
for i in /var/log/messages*; do | |
case $i in | |
*.bz2 ) | |
bunzip2 -c $i | egrep '(51|62)(:389|:636)' | awk '{print $8" "$10}' | awk -F':' '{print $1" "$3}' >> $tempdir/clients | |
;; |