Skip to content

Instantly share code, notes, and snippets.

View darktempla's full-sized avatar

darktempla

  • Brisbane, Australia
View GitHub Profile
@darktempla
darktempla / Vagrantfile
Last active December 23, 2023 21:44
Example of running k0s using vagrant and the k0sctl binary to install on the 2 nodes.
# Defines our Vagrant environment
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
nodeCount = 2
image = "debian/buster64"
ipRangeStart = 40
Vagrant.configure("2") do |config|
@darktempla
darktempla / jq.sh
Last active June 12, 2023 10:28
Extract a value from a JSON payload that contains a dot in the key name using the JQ command line tool
# the leading '.' in the dockerconfigfile key we are interested in
# makes the syntax harder then it should be, pay attention to the syntax used here
kubectl get secret/regcred -o json | jq -r '.data[".dockerconfigjson"]' | base64 -d
# OR
kubectl get secret/regcred -o jsonapath="{.data.\.dockerconfigjson}" | base64 -d