In this guide, we'll walk you through how to use the Kore CLI to set up a sandbox team environment locally and deploy a sample application.
We'll showcase how Kore can give you a head start with setting up clusters, team members and environments.
The installation of Kore created by
kore alpha local in this quick start is suitable for testing and proof-of-concept work. Bootstrapping a production installation of Kore is discussed in the install guide.
Please ensure you have the following installed on your machine:
- Docker: see Docker installation instructions
- Kubectl: see Kubectl installation instructions
- Kore CLI: see Getting the Kore CLI
This should provision a local kubernetes installation and deploy the official helm release.
You can now view the UI at http://localhost:3000 using the credentials output above, or use the CLI as described below.
You now have to login to be able to create teams and provision environments.
As you're the only user, you'll be assigned Admin privileges.
You can also enable single-sign-on for the UI and all clusters; see
how to configure Auth0 as an IDP provider. To enable the feature on the
local demo add
kore local up --enable-sso which will prompt for your OpenID settings
(you can do this at any point).
Let's create a team with the CLI. In local mode, you'll be assigned as team member to this team.
As a team member, you'll be able to provision environments on behalf of team.
To ensure the team was created,
We now need to tell Kore the details of the GCP project it needs to build a cluster on our behalf. These commands import a set of credentials into kore and allows your new team to use them to make clusters.
We'll then use these to create a cluster to host our sandbox environment. See a guide to configuring a token for GCP - we'll need the service account JSON which has owner privileges in the project.
Next, create the cloud account so Kore understands the GCP project to use:
It's time to use the Kore CLI to provision our Sandbox environment:
There's a lot to unpack here. So, lets walk through it,
create cluster, we create a cluster to host our sandbox environment.
appvia-trial, the name of the cluster.
-t team-appvia, the team for which we are creating the sandbox environment.
--plan gke-development, a Kore predefined plan called
gke-development. This creates a cluster ideal for non-prod use.
-a cloudaccount-gcp-gcp-shared, the
cloudaccount-gcp-gcp-sharedallocated cloud account to use for creating this cluster.
--namespaces sandbox, creates an environment called
appvia-trialwhere we can deploy our apps, servers, etc..
You now have a sandbox environment locally provisioned for your team. 🎉
We'll be using
kubectl, the Kubernetes CLI, to make the deployment. If you don't have it already, please install and setup kubectl.
Now we have to configure our
kubectl kubeconfig in ~/.kube/config with our new GKE cluster.
Switch the current
kubectl context to
Deploy the GKE example web application container available from the Google Cloud Repository
Now navigate to the
EXTERNAL-IP as a url
You should see this on the webpage
To avoid incurring charges to your Google Cloud account for the resources used in this quickstart, follow these steps.
You can now use kore to destroy the cluster:
You can check for the cluster deletion completing by retrieving the cluster:
Once the deletion is complete, the cluster will disappear from Kore:
Finally, after waiting for your cluster to delete, you may stop your local kore environment:
If you don't have a Google Cloud account, grab a credit card and go to https://cloud.google.com/. Then, click the “Get started for free” button. Finally, choose whether you want a business account or an individual one.
Next step: On GCP, select an existing project or create a new one.
(You can skip this step if GKE API is already enabled for this project)
With a GCP Project selected or created,
- Head to the Google Developer Console.
- Enable the 'Kubernetes Engine API'.
- Enable the 'Cloud Resource Manager API'
- Enable the 'Compute Engine API'
- Enable the 'IAM Service Account Credentials API'
Alternatively you can enable these from the gcloud command line:
(You can skip this step if you already have a Service Account setup)
With the a GCP Project selected or created,
- Head to the IAM Console.
Create service account.
- Fill in the form with details with your team's service account.
(You can skip this step if you're Service Account has the
- Assign the
Ownerrole to your Service account.
(You can skip this step if you already have your Service Account key downloaded in JSON format)
Kore will use this key to access the Service Account.
This is the last step, create a key and download it in JSON format.