Skip to content

Instantly share code, notes, and snippets.

View afbjorklund's full-sized avatar

Anders Björklund afbjorklund

  • Göteborg, Sweden
View GitHub Profile
.vagrant
#!/bin/sh
# Wrapper for using kubectl as "ssh", for rsync and git
# - setting either $RSYNC_RSH or $GIT_SSH env variables
namespace=''
pod=$1
shift
# POD[@NAMESPACE]:DEST
if [ "X$pod" = "X-l" ]; then
pod=$1
#!/usr/bin/env python
# convert go test report JSON into chrome tracing JSON
import sys
import json
import datetime
import dateutil.parser
def datetime_parser(json_dict):
@afbjorklund
afbjorklund / pstree.txt
Last active August 17, 2020 06:23
hello buildroot kubernetes world
# pstree
systemd-+-dbus-daemon
|-dockerd-+-containerd-+-7*[containerd-shim-+-pause]
| | | `-9*[{containerd-shim}]]
| | |-containerd-shim-+-etcd---10*[{etcd}]
| | | `-9*[{containerd-shim}]
| | |-containerd-shim-+-kube-apiserver---9*[{kube-apiserver}]
| | | `-9*[{containerd-shim}]
| | |-containerd-shim-+-kube-scheduler---8*[{kube-scheduler}]
| | | `-9*[{containerd-shim}]
@afbjorklund
afbjorklund / containerd-snapshots.md
Last active April 21, 2020 17:16
Handling containerd snapshots with ctr
root@minikube:/var/lib/containerd# ctr i pull docker.io/library/busybox:latest
docker.io/library/busybox:latest:                                                 resolved       |++++++++++++++++++++++++++++++++++++++| 
index-sha256:a8cf7ff6367c2afa2a90acd081b484cbded349a7076e7bdf37a05279f276bc12:    done           |++++++++++++++++++++++++++++++++++++++| 
manifest-sha256:a2490cec4484ee6c1068ba3a05f89934010c85242f736280b35343483b2264b6: done           |++++++++++++++++++++++++++++++++++++++| 
layer-sha256:e2334dd9fee4b77e48a8f2d793904118a3acf26f1f2e72a3d79c6cae993e07f0:    done           |++++++++++++++++++++++++++++++++++++++| 
config-sha256:be5888e67be651f1fbb59006f0fd791b44ed3fceaa6323ab4e37d5928874345a:   done           |++++++++++++++++++++++++++++++++++++++| 
elapsed: 2.6 s                                                                    total:  569.0  (218.8 KiB/s)                                     
unpacking linux/amd64 sha256:a8cf7ff6367c2afa2a90acd081b484cbded349a7076e7bdf37a05279f276bc
command-line-arguments
├ flag
├ fmt
├ os
├ github.com/golang/glog
├ bufio
├ bytes
├ errors
├ flag
├ fmt
23388 github.com/containers/libpod/cmd/podman/cliconfig
12308 k8s.io/api/core/v1
4670 github.com/containers/libpod/libpod
3833 net/http
3436 runtime
3081 k8s.io/apimachinery/pkg/apis/meta/v1
2829 github.com/gogo/protobuf/proto
2554 github.com/vishvananda/netlink
2545 github.com/openshift/api/config/v1
2473 github.com/containers/libpod/cmd/podman/varlink
@afbjorklund
afbjorklund / minikube-depth.txt
Created August 7, 2019 15:29
minikube dependencies, as plotted by github.com/KyleBanks/depth
k8s.io/minikube/cmd/minikube
├ bytes
├ fmt
├ log
├ os
├ strconv
├ github.com/golang/glog
├ bufio
├ bytes
├ errors
@afbjorklund
afbjorklund / minikube-modules.txt
Created August 7, 2019 11:42
minikube modules, listed by library size (in KB)
10120 k8s.io/api/core/v1
5968 github.com/aws/aws-sdk-go/service/s3
3716 net/http
3204 runtime
3124 github.com/googleapis/gnostic/OpenAPIv2
2808 k8s.io/api/extensions/v1beta1
2592 k8s.io/kubernetes/pkg/apis/core
2516 k8s.io/apimachinery/pkg/apis/meta/v1
2132 github.com/gogo/protobuf/proto
1984 github.com/json-iterator/go
@afbjorklund
afbjorklund / moxi.md
Last active September 16, 2019 08:45
Building moxi

Installing moxi

You need to use a supported OS, for the binary build dependencies to download.

This was tested with Ubuntu 16.04, but other distributions might also work...

Installing repo

https://code.google.com/archive/p/git-repo/