Skip to content

Commit 4972270

Browse files
committed
added kubernetes and minikube in bootstrap.sh
1 parent 2131ead commit 4972270

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

bootstrap.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,33 @@ install_docker() {
5252
sudo usermod -aG docker vagrant
5353
}
5454

55+
install_kubernetes_tools() {
56+
log "Installing Kubernetes tools (kubectl, minikube, kind)..."
57+
# Install kubectl
58+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
59+
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
60+
rm kubectl
61+
62+
# Install minikube
63+
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
64+
sudo install minikube-linux-amd64 /usr/local/bin/minikube
65+
rm minikube-linux-amd64
66+
67+
}
68+
5569
main() {
5670
update_system
5771
install_basic_tools
5872
install_postgres_client
5973
install_docker
60-
log "Bootstrap completed! Please log out and log back in (or run 'newgrp docker') to use Docker without sudo."
74+
install_kubernetes_tools
75+
log "Bootstrap completed!"
76+
log "Please log out and log back in (or run 'newgrp docker') to use Docker without sudo."
77+
log "Run 'minikube start --driver=docker --nodes 3' to start your Kubernetes cluster."
78+
log "After that, you can label nodes with:"
79+
echo "kubectl label node minikube type=application"
80+
echo "kubectl label node minikube-m02 type=database"
81+
echo "kubectl label node minikube-m03 type=dependent_services"
6182
}
6283

6384
main "$@"

0 commit comments

Comments
 (0)