Files
kubevpn/pkg/test/run.sh
2023-04-02 22:11:43 +08:00

11 lines
298 B
Bash

#!/bin/bash
export KUBECONFIG=~/.kube/vke
export NS=kube-system
kubectl apply -f pod.yaml -n $NS
kubectl wait --for=condition=Ready pod/test -n $NS
cd ./server && GOARCH=amd64 GOOS=linux go build -o main
kubectl cp main test:/app/main -n $NS
rm -fr main
kubectl port-forward pods/test 1080 -n $NS