|
1 | | -CLICK CLICK CLICK |
| 1 | +# Booting Kubernetes on Google Container Engine |
2 | 2 |
|
3 | | -kubectl should be working and pointed at the cluster |
| 3 | +Google Container Engine (GKE) is a managed Kubernetes environment which is great for hosting Deis Workflow. Google Container Engine manages the Kubernetes master and you pay for the compute nodes. Clusters smaller than five nodes are charged only for the compute. Clusters six nodes are larger cost $0.15/hour per cluster. |
| 4 | + |
| 5 | +If you do not already have a Google Cloud account, you can start a trial with $300 of free credit [here](https://goo.gl/ysYyZK). After completing sign up, you must add your billing information. |
| 6 | + |
| 7 | +## Create Your Google Cloud Project |
| 8 | + |
| 9 | +Sign in to your [Google Cloud Platform Console](https://console.cloud.google.com) and create a new project: |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +Pick a project name. A project groups resources together and can hold more than one container cluster: |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +Note the project ID. This is a unique name across all Google Cloud projects. Later, we will refer to this as `PROJECT_ID`. |
| 18 | + |
| 19 | +Next, [enable billing](https://console.cloud.google.com/billing) in the console. Next, enable the [Container Engine API](https://console.cloud.google.com/apis/api/container/overview) and [Compute Engine API](https://console.cloud.google.com/apis/api/compute_component/overview). You must complete *all three* steps before continuing. |
| 20 | + |
| 21 | +## Create Your GKE Cluster |
| 22 | + |
| 23 | +From the navigation hamburger in the upper left corner, find and select **Container Engine**: |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +Select **Create Container Cluster**: |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +For development and testing, we recommend you use the `n1-standard-2` machine type which has 2 VCPUs and 7.5 GB of RAM per server, and a cluster size of at least 2: |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +Click "Create" and Google Container Engine will provision your cluster. The process will take a few minutes to complete. |
| 36 | + |
| 37 | +## Install and configure the Google Cloud CLI |
| 38 | + |
| 39 | +While your container cluster is booting. You will need to install the Google Cloud CLI tools. We will use the tools to fetch cluster credentials to authenitcate to your new Kubernetes cluster. |
| 40 | + |
| 41 | +Google maintains a number of [quickstart guides](https://cloud.google.com/sdk/docs/) which walk you through the installation. |
| 42 | + |
| 43 | +Once you have installed the CLI tooling set your default project and list your container clusters: |
| 44 | + |
| 45 | +``` |
| 46 | +$ gcloud projects list |
| 47 | +PROJECT_ID NAME PROJECT_NUMBER |
| 48 | +ascendant-yeti-130419 My First Cluster 614974141267 |
| 49 | +``` |
| 50 | + |
| 51 | +Set your default project: |
| 52 | + |
| 53 | +``` |
| 54 | +$ gcloud config set project ascendant-yeti-130419 |
| 55 | +``` |
| 56 | + |
| 57 | +Then list your container clusters: |
| 58 | +``` |
| 59 | +$ gcloud container clusters list |
| 60 | +NAME ZONE MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS |
| 61 | +cluster-1 us-central1-b 1.2.4 104.154.234.246 n1-standard-2 1.2.3 * 2 RUNNING |
| 62 | +``` |
| 63 | + |
| 64 | +If you haven't configured your default zone, make sure it matches the ZONE for your cluster: |
| 65 | +``` |
| 66 | +$ gcloud config set compute/zone us-central1-b |
| 67 | +``` |
| 68 | + |
| 69 | +Now you may fetch Kubernetes credentials: |
| 70 | +``` |
| 71 | +$ gcloud container clusters get-credentials cluster-1 |
| 72 | +Fetching cluster endpoint and auth data. |
| 73 | +kubeconfig entry generated for cluster-1. |
| 74 | +``` |
| 75 | + |
| 76 | +Your local `kubectl` utility should now be pointed at your new container cluster. You can verify your crednentials and local configuration by running: |
| 77 | + |
| 78 | +``` |
| 79 | +$ kubectl cluster-info |
| 80 | +Kubernetes master is running at https://104.154.234.246 |
| 81 | +GLBCDefaultBackend is running at https://104.154.234.246/api/v1/proxy/namespaces/kube-system/services/default-http-backend |
| 82 | +Heapster is running at https://104.154.234.246/api/v1/proxy/namespaces/kube-system/services/heapster |
| 83 | +KubeDNS is running at https://104.154.234.246/api/v1/proxy/namespaces/kube-system/services/kube-dns |
| 84 | +kubernetes-dashboard is running at https://104.154.234.246/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard |
| 85 | +``` |
| 86 | + |
| 87 | +You are now ready to [install Deis Workflow](install-gke.md) |
4 | 88 |
|
5 | | -[next install workflow](install-gke.md) |
|
0 commit comments