This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parted --script /dev/sda mklabel gpt | |
parted --script /dev/sda mkpart primary btrfs 0% 100% | |
mkfs.btrfs --runtime-features free-space-tree --label My_Disk_2_TB --nodiscard /dev/sda1 | |
# Entry in /etc/fstab | |
# LABEL=My_Disk_2_TB /mnt/usb btrfs noatime,nodiratime,compress=zstd,autodefrag,space_cache=v2 | |
# Links: | |
# * https://wiki.tnonline.net/w/Btrfs/Space_Cache | |
# * https://unix.stackexchange.com/questions/53378/how-can-i-script-the-creation-of-a-single-partition-that-uses-the-entire-device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export CLUSTER_NAME="ruzickap-calico" | |
export AWS_DEFAULT_REGION="eu-central-1" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
export TAGS="[email protected] Environment=dev" | |
set -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export AZURE_LOCATION=westeurope | |
export CLUSTER_FQDN="ruzickap2aks.k8s.mylabs.dev" | |
# CLUSTER_NAME must have max 12 character due to "--nodepool-name" parameter | |
export CLUSTER_NAME="${CLUSTER_FQDN%%.*}" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
set -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export AZURE_LOCATION="westeurope" | |
export CLUSTER_FQDN="ruzickap1aks.k8s.mylabs.dev" | |
# CLUSTER_NAME must have max 12 character due to "--nodepool-name" parameter | |
export CLUSTER_NAME="${CLUSTER_FQDN%%.*}" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
set -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export CLUSTER_NAME="ruzickap3" | |
export AWS_DEFAULT_REGION="eu-central-1" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
export TAGS="[email protected] Environment=dev" | |
set -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export CLUSTER_FQDN="${CLUSTER_FQDN:-ruzickap-kops-ubuntu.k8s.mylabs.dev}" | |
export AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-eu-central-1}" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_FQDN}.conf" | |
export KOPS_STATE_STORE="s3://${CLUSTER_FQDN}" | |
set -euxo pipefail | |
## Create S3 bucket first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get secret -n test test-api-token -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eux | |
export CLUSTER_NAME="${CLUSTER_NAME:-ruzickap}" | |
export AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-eu-central-1}" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
export TAGS="[email protected] Environment=dev Group=Cloud_Native Squad=Cloud_Container_Platform" | |
set -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export CLUSTER_NAME="${USER}-cilium" | |
export AWS_DEFAULT_REGION="eu-central-1" | |
export KUBECONFIG="/tmp/kubeconfig-${CLUSTER_NAME}.conf" | |
export TAGS="[email protected] Environment=dev" | |
set -euxo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euxo pipefail | |
CLUSTER_NAME="rancher-dev" | |
k3d cluster delete --all | |
k3d cluster create "${CLUSTER_NAME}" \ | |
--port "8080:80@loadbalancer" --port "8443:443@loadbalancer" \ |
NewerOlder