sudo apt-get install -y qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- Install minikube https://kubernetes.io/docs/tasks/tools/install-minikube/
- Run typical minikube configuration
minikube config set driver docker
minikube config set cpus $(nproc)
minikube config set kubernetes-version 1.23.1
minikube start
minikube addons enable ingress
minikube addons enable ingress-dns
minikube addons enable metrics-server
- open project in JetBrains Goland
- switch docker into minikube
eval $(minikube docker-env)
- run devspace
devspace dev --var=OPERATOR_NAMESPACE=kube-system --var=DEVSPACE_DEBUG=delve
- create Golang debug configuration,
Run -> Edit configurations
, lookdeploy/devspace/*.run.xml
for details or use any IDE which supportdelve
remote debugging - update go modules if required
go mod tidy
go mod vendor
- change source files .go/.yaml etc., set breakpoints, look into .dockerignore
- devspace will rebuild docker images automatically and apply kubernetes manifest which is adopted to debug with delve.
- run Debug (SHIFT/CMD+F9)