Google Container Engine (GKE) - Kubernetes
Google Container Engine is a powerful cluster manager and orchestration system for running your Docker containers built on Kubernetes. Deploying to GKE will follow the standard Kubernetes steps outlined below.
The first step will be to make sure that your Kubernetes master is up. Login to https://console.cloud.google.com with your Google Credentials.
Enter to Containers Engine and make sure you have created GKE cluster.
Get your cluster username and password from
Container Cluster →
<your cluster> →
To connect to your cluster from your machine:
Then create deployment.yml for your app http://kubernetes.io/docs/user-guide/deployments and test it by running:
Deploy to GKE from Codefresh pipeline
The deployment script makes the following assumptions about your application and Kubernetes configuration:
- The application is deployed using the Kubernetes deployment API (versus the replication controller directly). For more information read http://kubernetes.io/docs/user-guide/deployments/
- The tested codebase has a yaml file that describes the Kubernetes deployment parameters and configuration of your application.
- At the moment, only the basic username/pass authentication is supported.
Deploy to Kubernetes
Set up the following environment variables to specify the Kubernetes cluster we’ll use to deploy the project.
||The user for the Kubernetes cluster. Mandatory.|
||The password for the Kubernetes cluster. Mandatory.|
||The server (HTTPS endpoint) of the Kubernetes cluster’s API. Mandatory.|
- Run the build in Codefresh.io
- Check that the deployment succeeded with kubectl: