Re-write development instructions
@@ -43,6 +43,35 @@ Setup tasks can reference a Helm chart which will be fetched and evaluated local
This project was bootstrapped by [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) and inherits many of the stock conventions. Some notable exceptions are the inclusion of the `make tool` target for building the Red Sky Control tool and overloading `make docker-build` to produce both the Red Sky Experiment Manager image and the Setup Tools image.
-To run the Red Sky Experiment Manager locally: first run `make install` to add the necessary Custom Resource Definitions (CRD) to you currently configured cluster; then run `make run` to start a local process (inheriting Red Sky Client API configuration from your current environment).
+To run the Red Sky Experiment Manager locally: first run `make install` to add the necessary Custom Resource Definitions (CRD) to you currently configured cluster.
-To run in cluster, first build the Docker images using `make docker-build`. Next, push the images to your cluster (if you are using minikube, just run `eval $(minikube docker-env)` prior to building the images): for example, `export IMG=us.gcr.io/$PROJECT_ID/k8s-experiment:$TAG` and `export SETUPTOOLS_IMG=us.gcr.io/$PROJECT_ID/setuptools:$TAG` before running `make docker-push` (choose your own unique value for `TAG`). Finally, run `make deploy` to apply the manifests, or use `make tool` and `bin/redskyctl-$GOOS-$GOARCH init`.
+If you would like to start a local process (inheriting Kubeconfig and Red Sky Client API configuration from your current environment), first ensure that any manager in the cluster is disabled:
+
+```sh
+kubectl scale deployment redsky-controller-manager -n redsky-system--replicas 0
+make run
+```
+
+You can also debug using existing images (e.g. the latest CI builds): configure your debugger to pass the following arguments to the Go tools: `-ldflags "-X github.com/redskyops/k8s-experiment/pkg/controller/trial.Image=gcr.io/redskyops/setuptools:canary -X github.com/redskyops/k8s-experiment/pkg/controller/trial.ImagePullPolicy=Always"`.
+
+Alternatively, if you would like to package the manager image and run it in minikube, build the Docker images directly to the minikube host:
+
+```sh
+eval $(minikube docker-env)
+make docker-build
+make deploy
+```
+
+To package the manager and run it in a GKE cluster, you will need to push the images to GCR:
+
+```sh
+export PROJECT_ID=<GCP project ID where your cluster is running>
+export TAG=<something unique>
+export IMG=us.gcr.io/$PROJECT_ID/k8s-experiment:$TAG
+export SETUPTOOLS_IMG=us.gcr.io/$PROJECT_ID/setuptools:$TAG
+make docker-build
+make docker-push
+make deploy
+```
+
+You can also use `make tool` and `bin/redskyctl-$GOOS-$GOARCH init` in place of `make deploy` to use actual versioned manifests.
