Skip to content

Instantly share code, notes, and snippets.

View jefflaplante's full-sized avatar

Jeff LaPlante jefflaplante

View GitHub Profile
@jefflaplante
jefflaplante / microk8s_in_lxc.md
Created December 24, 2023 03:37 — forked from acj/microk8s_in_lxc.md
Installing microk8s in an LXC container

Installing microk8s in an LXC container

I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.

  1. Create a privileged LXC container through the Proxmox web interface
  • Enable nesting and FUSE
    • In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
  1. SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
    • Add the following lines
  • lxc.apparmor.profile: unconfined
@jefflaplante
jefflaplante / gist:74c5510c220c9d658a72f6aa8940c9c9
Created April 10, 2019 17:55
Stripping newline from end of file in vim
:set noendofline binary
:w
@jefflaplante
jefflaplante / squash.sh
Last active April 30, 2018 15:44
Rebase Git Workflow
# This script will help you squash commits in your feature branch
# and enable you to submit a PR to merge your branch with master.
# Ensure you have your feature branch checked out with a clean
# working directory before rebasing.
# Get the current branch - use this as feature branch to merge.
feature_branch=$(git rev-parse --abbrev-ref HEAD)
# Get merge base and squash commits
merge_base=$(git merge-base $feature_branch master)
map s :2,$s/^pick/squash/<CR>
@jefflaplante
jefflaplante / gist:198298ad107b8af4680c7e641503fa5f
Last active July 3, 2017 18:59
Getting Helm releases that can be safely removed
kubectl get cm -n kube-system -l "OWNER=TILLER, STATUS!=DEPLOYED, VERSION!=1" -o go-template='{{- range .items }}{{ printf "%-35s\t%-3s\t%-35s\n" .metadata.name .metadata.labels.VERSION .metadata.labels.NAME }}{{- end }}'
@jefflaplante
jefflaplante / gist:e85db3acffbefa46b86ab6a593ac072b
Last active July 3, 2017 19:00
Get all images for all pods in a kubernetes cluster
kubectl get pods --all-namespaces -o go-template='{{ range .items }}{{- printf "%-5s\t%-45s\t%-20v\t" .metadata.namespace .metadata.name .status.startTime}}{{- range .spec.containers }}{{- printf "%s " .image }}{{- end }}{{- printf "\n" }}{{- end }}'
stage "notify"
node {
sh '''
MSG='This is the message here'
SERVER=irc.freenode.net
CHANNEL=#mictest
USER=mic2234test
(
echo NICK $USER
@jefflaplante
jefflaplante / kube-proxy.yaml
Created October 24, 2016 02:54
kube-proxy.yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/config.hash: b389fb1cc04a861f21ba9efb8f61bf07
kubernetes.io/config.mirror: b389fb1cc04a861f21ba9efb8f61bf07
kubernetes.io/config.seen: 2016-10-18T17:52:10.122562409Z
kubernetes.io/config.source: file
creationTimestamp: 2016-10-18T17:53:25Z
labels:
@jefflaplante
jefflaplante / kube-dns.yaml
Created October 24, 2016 02:38
kube-dns.yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/created-by: |
{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicationController","namespace":"kube-system","name":"kube-dns-v20","uid":"c3e7f767-955b-11e6-8079-42010a8a0097","apiVersion":"v1","resourceVersion":"87"}}
scheduler.alpha.kubernetes.io/critical-pod: ""
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
creationTimestamp: 2016-10-18T17:53:24Z
generateName: kube-dns-v20-

Keybase proof

I hereby claim:

  • I am jefflaplante on github.
  • I am jefflaplante (https://keybase.io/jefflaplante) on keybase.
  • I have a public key whose fingerprint is 33D6 D3B6 95C8 710F 8A1C 4E3A 8662 1A24 D92F 0886

To claim this, I am signing this object: