Install Kubebuilder On Windows Online
export GOPATH=$(go env GOPATH) export PATH=$PATH:$GOPATH/bin chmod +x /usr/local/bin/kubebuilder 4. Controller doesn’t connect to cluster Ensure KUBECONFIG is set:
sudo apt update && sudo apt upgrade -y wget https://go.dev/dl/go1.22.5.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc source ~/.bashrc go version Step 4 – Install Make, Git, and other tools sudo apt install -y make git gcc Step 5 – Download Kubebuilder Choose a version (e.g., 3.14.0): install kubebuilder on windows
wsl --unregister Ubuntu Do not attempt native Windows Kubebuilder – it will waste hours. Use WSL2 – it takes 15–20 minutes to set up and behaves identically to Linux, which is what all official tutorials assume. export KUBECONFIG=~/
export KUBECONFIG=~/.kube/config kubectl get nodes Enable WSL2 integration in Docker Desktop → Settings → WSL Integration. IDE Setup (Visual Studio Code) Install VS Code with Remote – WSL extension. Open \\wsl$\Ubuntu\home\yourname\projects\my-operator directly. You get full IntelliSense, debugging, and terminal inside WSL2. Uninstallation Native Windows: Delete the folder and remove from PATH. You get full IntelliSense, debugging, and terminal inside
sudo rm /usr/local/bin/kubebuilder rm -rf ~/go/bin/kubebuilder To remove WSL2 distro completely:

