Created
April 12, 2025 20:50
-
-
Save antonmry/1dfa4a891bba8e336f0bfd865ff17064 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
## K8s cluster with kind | |
Docker is the only available dependency. | |
TODO: amd64? | |
docker build -t kind-cli -f Dockerfile.kind . | |
docker run --rm -it \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
kind-cli --help | |
TODO: make sure the kind version is hardcoded | |
docker pull kindest/node:v1.30.0 | |
docker run --rm -it \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v ./.kube:/root/.kube \ | |
-v $(pwd)/kind-config.yaml:/kind-config.yaml \ | |
kind-cli create cluster --name rerun-kind-cluster --config /kind-config.yaml | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
cluster-info --context kind-rerun-kind-cluster | |
docker run --rm -it \ | |
alpine/helm:latest \ | |
template cilium cilium \ | |
--repo https://helm.cilium.io/ \ | |
--version 1.17.2 \ | |
--namespace kube-system \ | |
--set cni.install=true \ | |
--set cni.exclusive=true \ | |
--set kubeProxyReplacement=true \ | |
--set operator.replicas=1 \ | |
--set ipam.mode=kubernetes \ | |
--set securityContext.privileged=true \ | |
> cilium.yaml | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
-v $(pwd)/cilium.yaml:/work/cilium.yaml \ | |
-w /work \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
apply -f cilium.yaml --context kind-rerun-kind-cluster | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
get pods --namespace kube-system -l k8s-app=cilium --context kind-rerun-kind-cluster | |
## Docker server image | |
TODO: create rerun-server:dev | |
docker build -t rerun-server -f Dockerfile | |
docker run --rm --name rerun-server -p 50051:50051 rerun-server | |
cargo run --bin client -- fetch-recording cfdcd656-e423-481c-997a-4d601f0d81b3 | |
docker run --rm -it \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
kind-cli \ | |
load docker-image rerun-server --name rerun-kind-cluster | |
## Deploy in k8s | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
-v $(pwd):/work \ | |
-w /work \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
apply -f deployment.yaml --context kind-rerun-kind-cluster | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
-v $(pwd):/work \ | |
-w /work \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
apply -f service.yaml --context kind-rerun-kind-cluster | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
-v $(pwd):/work \ | |
-w /work \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
get pods -l app=rerun-server --context kind-rerun-kind-cluster | |
docker run --rm -it \ | |
-v ./.kube:/root/.kube \ | |
-v $(pwd):/work \ | |
-w /work \ | |
--network host \ | |
--entrypoint kubectl \ | |
kindest/node:v1.30.0 \ | |
get service rerun-server-service | |
## Clean everything | |
docker run --rm -it \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
kind-cli delete cluster --name rerun-kind-cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment