Skip to content

Instantly share code, notes, and snippets.

View lizrice's full-sized avatar

Liz Rice lizrice

View GitHub Profile
@lizrice
lizrice / kubelet-api.md
Last active March 15, 2023 12:13
Checking Kubelet API access

Accessing Kubelet API

curl -sk https://localhost:10250/pods/
  • If --anonymous-auth is turned off, you will see a 401 Unauthorized response.
  • If --anonymous-auth is true and --authorization-mode is Webhook you'll see 403 Forbidden response with message Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=proxy)
  • If --anonymous-auth is true and --authorization-mode is AlwaysAllow you'll see a list of pods.
@lizrice
lizrice / Vagrantfile
Last active February 3, 2023 02:21
Vagrant file for setting up a single-node Kubernetes cluster that I can access from my desktop. Read more: https://medium.com/@lizrice/kubernetes-in-vagrant-with-kubeadm-21979ded6c63
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This script to install Kubernetes will get executed after we have provisioned the box
$script = <<-SCRIPT
# Install kubernetes
apt-get update && apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
@lizrice
lizrice / vpc-fargate.yaml
Created January 23, 2018 18:01
Cloudformation template for setting up VPC and subnets for Fargate
# Usage:
# aws cloudformation --region <region> create-stack --stack-name <stack name> --template-body file://vpc-fargate.yaml
# This template will:
# Create a VPC with:
# 2 Public Subnets
# 2 Private Subnets
# An Internet Gateway (with routes to it for Public Subnets)
# A NAT Gateway for outbound access (with routes from Private Subnets set to use it)
#
@lizrice
lizrice / hellodeploy.json
Created September 13, 2017 13:42
Example template for multi-container group in Azure Container Instance deployment
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"resources": [
{
"name": "helloContainerGroup",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2017-08-01-preview",
@lizrice
lizrice / keybase.md
Created January 30, 2017 17:48
Keybase

Keybase proof

I hereby claim:

  • I am lizrice on github.
  • I am lizrice (https://keybase.io/lizrice) on keybase.
  • I have a public key whose fingerprint is 09C3 9806 D4C5 31E7 2215 D9C9 19C1 59ED 9DBA D993

To claim this, I am signing this object:

@lizrice
lizrice / main.go
Created August 25, 2016 10:02
Container from scratch
package main
// @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001
import (
"fmt"
"os"
"os/exec"
"syscall"
)
@lizrice
lizrice / fabfile.py
Created August 7, 2014 10:00
Fab file for connecting and disconnecting to Raspberry PI
from __future__ import with_statement
from fabric.api import local, lcd
# Usage:
# fab connect - mounts /home/pi/<pi_dir> so it's available locally at <workspace><remote>
# fab disconnect - unmount
#
# Note this is Mac specific - Linux distributions use fusermount -u instead of umount
# Requires OSXFUSE and SSHFS from http://osxfuse.github.io/