Skip to content

Commit

Permalink
add fix kube ip command
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhtuan0409 committed Aug 18, 2022
1 parent cd413ee commit 8cb7345
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/anduin-kube
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ case $1 in
time-sync)
timeSync
;;
fix-kube-ip)
fixKubeIP
;;
*)
minikube $@
;;
Expand Down
7 changes: 7 additions & 0 deletions lib/functions/fix-kube-ip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

function fixKubeIP {
ip=$(minikube ip)
echo "Minikube ip: ${ip}"
find $HOME/.anduin-kube -type f -exec sed -i "s/192.168.144.100/${ip}/g" {} \;
}

0 comments on commit 8cb7345

Please sign in to comment.