File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.idea
22** /.gcp /** /* .json
33* .terraform *
4- * tfstate *
4+ * tfstate *
5+
6+ * config-kind-in-container *
Original file line number Diff line number Diff line change @@ -22,6 +22,21 @@ services:
2222 networks :
2323 - kind
2424
25+ tf-bastion :
26+ image : gregogs/cuda:workers-v1.0
27+ container_name : tf-bastion-external
28+ extra_hosts :
29+ - " host.docker.internal:host-gateway"
30+ volumes :
31+ - ../../../workloads:/workloads:rw
32+ - ../mysql-database:/data:ro
33+ - ../tf/config-kind-in-container:/root/.kube/config:ro
34+ environment :
35+ - KUBECONFIG=/root/.kube/config
36+ command : [ "bash", "-lc", "sleep infinity" ]
37+ networks :
38+ - kind
39+
2540networks :
2641 kind :
2742 external : true
Original file line number Diff line number Diff line change 1+ FROM tensorflow/tensorflow:latest-gpu
2+ LABEL authors="greg-ogs"
3+
4+ RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg
5+
6+ RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.34/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
7+
8+ RUN chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
9+ echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.34/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list && \
10+ chmod 644 /etc/apt/sources.list.d/kubernetes.list
11+
12+ RUN apt-get update && apt-get install -y kubectl
Original file line number Diff line number Diff line change 1+ apiVersion : metallb.io/v1beta1
2+ kind : IPAddressPool
3+ metadata :
4+ name : lb-pool
5+ namespace : metallb-system
6+ spec :
7+ addresses :
8+ - 172.18.255.200-172.18.255.250
9+ ---
10+ apiVersion : metallb.io/v1beta1
11+ kind : L2Advertisement
12+ metadata :
13+ name : lb-adv
14+ namespace : metallb-system
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.15.2/config/manifests/metallb-native.yaml
4+
5+ kubectl -n metallb-system wait deploy --all --for=condition=Available --timeout=120s
6+
7+ docker network inspect kind --format ' {{json .IPAM.Config}}'
8+
9+ kubectl apply -f ./infra/local/tf/metallb-adreess-pool.yaml
10+
11+ # For the container kubectl using kind
12+
13+ # Powershell
14+ # $src = "$env:USERPROFILE\.kube\config"
15+ # $dst = "$env:USERPROFILE\.kube\config-kind-in-container"
16+ # Copy-Item $src $dst -Force
17+
18+ # (Get-Content $dst) -replace 'https://127\.0\.0\.1:(\d+)', 'https://desktop-control-plane:$1' | Set-Content $dst
19+
20+ cp ~ /.kube/config ~ /.kube/config-kind-in-container
21+ sed -i -E ' s#https://127\.0\.0\.1:([0-9]+)#https://desktop-control-plane:\1#g' ~ /.kube/config-kind-in-container
You can’t perform that action at this time.
0 commit comments