Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Mike Johnson mikejk8s

:octocat:
View GitHub Profile
View gist:816904b3637af670096815a7481bbb8b

new-module-test

This project was generated by generator-tf-module

Overview

This is a new module

Usage

View keybase.md

Keybase proof

I hereby claim:

  • I am mikejk8s on github.
  • I am mike_johnson (https://keybase.io/mike_johnson) on keybase.
  • I have a public key ASDniYq4wCLu4vpxbwBQV6_Uxzgow3tJ2H6LSuNlVygwIwo

To claim this, I am signing this object:

@mikejk8s
mikejk8s / config.plist
Created Feb 17, 2018
MSi Gaming z170a m5 hackintosh
View config.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>DSDT</key>
<dict>
<key>Fixes</key>
<dict>
@mikejk8s
mikejk8s / nginx-rbac-prod-use.yaml
Last active Jan 26, 2018
0.10.0 nginx-ingress full RBAC
View nginx-rbac-prod-use.yaml
apiVersion: v1
kind: Service
metadata:
labels:
name: "{{.Values.websocket_ingress_name}}"
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
name: "{{.Values.websocket_ingress_name}}"
@mikejk8s
mikejk8s / fluentd.yaml
Created Nov 13, 2017
Trying to resize GKE fluentd..
View fluentd.yaml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluentd-gcp-mj
namespace: kube-system
labels:
k8s-app: fluentd-gcp-mj
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: EnsureExists
version: v2.0
@mikejk8s
mikejk8s / remove-fluentd.yaml
Last active Nov 6, 2020
Remove fluentd GKE
View remove-fluentd.yaml
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: startup-script
labels:
app: startup-script
spec:
template:
metadata:
labels:
View google-snapshot-delete
#!/bin/bash
# snapshots are incremental and dont need to be deleted, deleting snapshots will merge snapshots, so deleting doesn't loose anything
# having too many snapshots is unwiedly so this script deletes them after 60 days
#
gcloud compute snapshots list --filter="creationTimestamp<$(date -d "-2 days" "+%Y-%m-%d")" --regexp "(gcs.*)" --uri | while read SNAPSHOT_URI; do
gcloud compute snapshots delete $SNAPSHOT_URI --quiet
done
#
@mikejk8s
mikejk8s / google-snapshot
Created Nov 2, 2017
Google Compute Snapshotter
View google-snapshot
#!/bin/bash
# loop through all disks within this project and create a snapshot
gcloud compute disks list --format='value(name,zone)'| while read DISK_NAME ZONE; do
gcloud compute disks snapshot $DISK_NAME --snapshot-names gcs-$DISK_NAME-$(date "+%Y-%m-%d-%s") --zone $ZONE
done
#
@mikejk8s
mikejk8s / delete.sh
Created Nov 1, 2017
for loop pod delete
View delete.sh
for pod in `kubectl get pod -n=yournamespace --show-all |grep Your-Pod-Name |awk '{ print $1 }'`; do kubectl delete pod $pod -n=yournamespace; done
@mikejk8s
mikejk8s / kubearray.sh
Last active Sep 6, 2017
k8s federation the hard way script
View kubearray.sh
#! /bin/bash
CLUSTERS=( "fed-a" "fed-b" )
ZONES=( "us-central1-a" "us-central1-b")
for i in {0..1}; do
mkdir -p kubeconfigs/${CLUSTERS[${i}]}/
SERVER=$(gcloud container clusters describe ${CLUSTERS[${i}]} \
--zone "${ZONES[${i}]}" \
--format 'value(endpoint)')