Skip to content

Instantly share code, notes, and snippets.

@emidoots
Last active November 27, 2018 06:09
Show Gist options
  • Save emidoots/7fbf4a1015437863962b2c7e40406da7 to your computer and use it in GitHub Desktop.
Save emidoots/7fbf4a1015437863962b2c7e40406da7 to your computer and use it in GitHub Desktop.

Option 2: Provision a new cluster locally using Docker for Mac

  1. Enable / install Docker for Mac's Kubernetes support via Docker > Preferences > Kubernetes:

image

  1. Ensure Docker has lots of memory (e.g. 8GB).

  2. Delete all resources and limits references in our repository. Otherwise all pods will fail to start due to hitting the resource requests. Unless you have something like a 90 core 300GB RAM dev laptop, I don't know of a better way to do this.

  3. Following our own instructions, when prompted, create the storageclass using the docker.io/hostpath provider:

# base/sourcegraph.StorageClass.yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: sourcegraph
  labels:
    deploy: sourcegraph

provisioner: docker.io/hostpath
  1. After running kubectl-apply-all.sh, port forward to visit the frontend:
kubectl port-forward $(kubectl get pod -l app=sourcegraph-frontend -o template --template="{{(index .items 0).metadata.name}}") 3080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment