Skip to content

Instantly share code, notes, and snippets.

View jeefy's full-sized avatar
😏
#honkernetes

Jeffrey Sica jeefy

😏
#honkernetes
View GitHub Profile
@jeefy
jeefy / CLBO: PVP
Last active November 15, 2024 18:07
CLBO Attendee Round 2: PVP Edition
Competitors will group into teams based on where they're sitting (keep it easy)
This challenge is a PVP challenge, and has two phases: Prepare, then Attack
## PREPARE PHASE ##
Two KUBECONFIGs will be linked in the #clashloopbackoff-attendee channel. They're also part of this Gist.
`team-1.conf` will be Team Right
@jeefy
jeefy / gist:580e0fda75a2c0f6081277ce4a66b456
Created November 12, 2024 17:25
ClashLoopBackOff: Attendee Edition
Hello! If you're seeing this you want to participate in the Attendee Edition of ClashLoopBackOff. Unlike the more hosted version, this is a more "guided" challenge.
You will need the following installed locally in order to participate:
- https://kind.sigs.k8s.io/
- https://kubernetes.io/docs/reference/kubectl/
That's it! You'll be creating a Kind cluster locally and interacting with it. Everything else will be done during the event, Wi-Fi and Demo Deities willing.
Good luck!
@jeefy
jeefy / kubernetes_add_service_account_kubeconfig.sh
Last active April 13, 2020 23:12 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@jeefy
jeefy / honkctl-jan
Last active January 18, 2020 14:18
!honkctl does what you think
disabled: avada, cat, ls
enabled: ungoose
full on oprah, everyone gets a cluster. first command spins it up. takes ~3min. if that's too long for you, bother bentheelder.
there is a challenge. that's all we'll say.
points are not awarded for breaking your cluster. if you break it, ungoose it.
-----BEGIN CERTIFICATE-----
MIIHGjCCBgKgAwIBAgIQEAhc1aJA93W3qr8cXSRiyzANBgkqhkiG9w0BAQsFADB2
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCTUkxEjAQBgNVBAcTCUFubiBBcmJvcjES
MBAGA1UEChMJSW50ZXJuZXQyMREwDwYDVQQLEwhJbkNvbW1vbjEfMB0GA1UEAxMW
SW5Db21tb24gUlNBIFNlcnZlciBDQTAeFw0xOTA1MzAwMDAwMDBaFw0yMTA1Mjky
MzU5NTlaMIHIMQswCQYDVQQGEwJVUzEOMAwGA1UEERMFNDgxMDkxCzAJBgNVBAgT
Ak1JMRIwEAYDVQQHEwlBbm4gQXJib3IxGTAXBgNVBAkTEDUzMCBTLiBTdGF0ZSBT
dC4xHzAdBgNVBAoTFlVuaXZlcnNpdHkgb2YgTWljaGlnYW4xKDAmBgNVBAsTH0lu
Zm9ybWF0aW9uIFRlY2hub2xvZ3kgU2VydmljZXMxIjAgBgNVBAMTGXJlZ2lzdHJ5
LmFyYy10cy51bWljaC5lZHUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
@jeefy
jeefy / Vagrantfile
Last active July 4, 2018 00:38
Vagrantfile for Kubernetes development / testing
$script = <<-SCRIPT
export DEBIAN_FRONTEND=noninteractive
export HOME=/root
apt-get update && apt-get install -y apt-transport-https
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce gcc make build-essential tzdata
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.2.0"
},
"networkd": {},
@jeefy
jeefy / mongo_backup.sh
Last active May 2, 2018 15:51
hateful but sane mongo container backup cron
#!/bin/bash
containers=$(sudo docker ps | grep mongo | awk '{if(NR>1) print $NF}')
timestamp=$(date +%Y-%m-%d_%H-%M-%S)
backup_command="mongodump --gzip --archive=/data/db/$timestamp.tar.gz"
prune_command="find /data/db/ -type f -mtime +7 -name '*.gz' -execdir rm -- '{}' \;"
for container in $containers
do
echo $container
echo $backup_command
docker exec $container /bin/sh -c "$backup_command"

Keybase proof

I hereby claim:

  • I am jeefy on github.
  • I am jeefy (https://keybase.io/jeefy) on keybase.
  • I have a public key whose fingerprint is 4BA1 F0DB 154A 7A60 D8ED AFCF 9A36 B60D DC72 2C87

To claim this, I am signing this object:

@jeefy
jeefy / install-rancher-compose.sh
Last active January 25, 2021 11:14
Rancher Compose Install Script
#!/bin/bash
# To run locally: ` curl -s https://gist.githubusercontent.com/jeefy/7fed19a335d5caae24639e7ee7be1b71/raw/install-rancher-compose.sh | sh `
VERSION_NUM="0.9.2"
wget https://github.com/rancher/rancher-compose/releases/download/v${VERSION_NUM}/rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
tar zxf rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
rm rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose