Cluster-Autoscaler: Add FAQ entry about e2e
@@ -215,3 +215,29 @@ There are three options:
Scale up will periodically try to increase the cluster and, once failed, move back to the previous size until the quota arrives or
the scale-up-triggering pods are removed.
+# Developer:
+
+### How can I run e2e tests?
+
+1. Set up environment and build e2e.go as described in [Kubernetes docs](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md#building-and-running-the-tests).
+2. Set up the following env variables:
+ ```sh
+ export KUBE_AUTOSCALER_MIN_NODES=3
+ export KUBE_AUTOSCALER_MAX_NODES=5
+ export KUBE_ENABLE_CLUSTER_AUTOSCALER=true
+ ```
+ This is the minimum number of nodes required for all e2e tests to pass. The tests should also pass if you set higher quota.
+3. Run `go run hack/e2e.go -- -v --up` to bring up your cluster.
+4. SSH to the master node and edit `/etc/kubernetes/manifests/cluster-autoscaler.manifest` (you will need sudo for this).
+ * If you want to test your custom changes set `image` to point at your own CA image.
+ * Make sure `--scale-down-enabled` parameter in `command` is set to `true`.
+5. Run CA tests with:
+ ```sh
+ go run hack/e2e.go -- -v --test --test_args="--ginkgo.focus=\[Feature:ClusterSizeAutoscaling"
+ ```
+ It will take >1 hour to run the full suite. You may want to redirect output to file, as there will be plenty of it.
+
+A few tests are specific to GKE and will be skipped if you're running on a
+different provider.
+
+Please open an issue if you find a failing or flaky test (a PR will be even more welcome).
