Skip to content

Instantly share code, notes, and snippets.

View inductor's full-sized avatar
🐳
Dockerizing

Kohei Ota (inductor) inductor

🐳
Dockerizing
View GitHub Profile
@inductor
inductor / containerd2.sh
Created November 18, 2023 23:46
containerd2.sh
#/bin/bash
ARCH="amd64"
OS="linux"
CONTAINERD_VERSION="2.0.0-beta.0"
RUNC_VERSION="1.1.10"
CNI_VERSION="1.3.0"
cd /tmp
# Install containerd
@inductor
inductor / kind.yaml
Created May 21, 2022 22:18
kind.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
apiServer:
certSANs:
- "test.cluster"
@inductor
inductor / Dockerfile
Created May 13, 2022 22:58
Dockerfile
# syntax=docker/dockerfile:1.4
FROM golang:1.17-bullseye as build
WORKDIR /go/src/app
RUN <<EOF
apt-get update
apt-get install -y git
apt-get clean \
rm -rf /var/lib/apt/lists/*
EOF
RUN --mount=type=ssh git clone [email protected]:myorg/myproject.git myproject
@inductor
inductor / eks-addon-irsa.sh
Created April 17, 2022 11:51
eks-addon-irsa.sh
#!/bin/sh -eu
export CLUSTER_NAME=dreamkast-cluster
export CLUSTER_REGION=ap-northeast-1
export PROFILE=default
curl -o /tmp/iam_policy.json "https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.1/docs/install/iam_policy.json"
aws iam create-policy \
--policy-name "AWSLoadBalancerControllerIAMPolicy" \
--policy-document "file:///tmp/iam_policy.json" \
@inductor
inductor / kubeadm-ha.sh
Last active April 12, 2022 11:22
kubeadm-ha.sh
#/bin/bash -eu
# Set global variables
KUBE_API_SERVER_VIP=192.168.0.100
NODE_IPS=( 192.168.0.11 192.168.0.12 192.168.0.13 )
# Install HAProxy
apt-get install -y --no-install-recommends software-properties-common
add-apt-repository ppa:vbernat/haproxy-2.4 -y
sudo apt-get install -y haproxy=2.4.\*
@inductor
inductor / kubeadm-setup-ubuntu.sh
Last active February 4, 2023 06:33
kubeadm-setup-ubuntu.sh
#/bin/bash -eu
# Install Containerd
cat <<EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
br_netfilter
EOF
sudo modprobe overlay
sudo modprobe br_netfilter
@inductor
inductor / cilium-installation.log
Created December 13, 2021 14:52
cilium-installation.log
Found 6 pods, using pod/cilium-4c44d
level=info msg="Started gops server" address="127.0.0.1:9890" subsys=daemon
level=info msg="Memory available for map entries (0.003% of 16791707648B): 41979269B" subsys=config
level=info msg="option bpf-ct-global-tcp-max set by dynamic sizing to 147295" subsys=config
level=info msg="option bpf-ct-global-any-max set by dynamic sizing to 73647" subsys=config
level=info msg="option bpf-nat-global-max set by dynamic sizing to 147295" subsys=config
level=info msg="option bpf-neigh-global-max set by dynamic sizing to 147295" subsys=config
level=info msg="option bpf-sock-rev-map-max set by dynamic sizing to 73647" subsys=config
level=info msg=" --agent-health-port='9876'" subsys=daemon
level=info msg=" --agent-labels=''" subsys=daemon
@inductor
inductor / docker-multi-stage-build.sh
Last active December 13, 2021 03:29
docker-multi-stage-build.sh
set -ex
cat <<EOF > Dockerfile
FROM debian:buster-slim as dependency
WORKDIR /app
COPY test.sh .
RUN ./test.sh
FROM debian:buster-slim as target-0
WORKDIR /app
COPY --from=dependency /app/* /app/
@inductor
inductor / CronJob.yaml
Created December 6, 2021 13:58
CronJob.yaml
apiVersion: batch/v1
kind: CronJob
metadata:
name: fetch-cfp-info
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
spec:
@inductor
inductor / sakura-cloud-minecraft.sh
Created November 16, 2021 08:13
sakura-cloud-minecraft.sh
cat <<EOF > values.yaml
resources:
requests:
memory: 8192Mi
cpu: 800m
minecraftServer:
eula: "TRUE"
version: "1.17.1"
memory: "8192M"