Skip to main content
Version: 0.8

Provisioning Kubernetes Clusters in Kore

To get your application running on Kore, you will need a cluster. A cluster represents a dedicated, isolated Kubernetes cluster available for your team. It can be hosted in AWS, Google Cloud, or Microsoft Azure.

Once you are in a team, you can access a cluster, and create one if needed.

Access a cluster#

Important

You must assume a role to access a cluster for any purpose. Role assumption is time-limited to one hour by default. After an hour you must re-assume the role, as described below, to continue working with your cluster.

If you have one or more clusters available to your team, you can get kubectl access to them using the kore access cluster command.

kore access cluster does two operations (which you can also run separately):

  • Sets your kubectl context to access a cluster that your team owns—see kore kubeconfig.
  • Performs a role assumption to grant you temporary permissions on that cluster—see kore assume and Assume a Role.

You can provide all details directly, or run with no parameters to choose interactively:

$ kore access cluster eks-dev project-namespace --role cluster.viewer◉ Waiting for role to be applied✔ Access to cluster eks-dev with role cluster.viewer granted until: 30 Apr 21 19:48 BST✔ Current kubectl context set to devs.eks-dev

Once complete, use kubectl to access your cluster as normal. For example:

$ kubectl get pods -n project-namespaceNo resources found in project-namespace namespace.

Create a cluster#

To create a cluster, you will need to have access to a cloud allocated to your team by your Kore administrator, as discussed in the Cloud Accounts section.

A cluster is associated with a plan, chosen when creating the cluster. A plan represents a set of parameters that define how the cluster should be built: which features are enabled, what size it should be, etc.

Cluster plans:

  • Provide sane default settings out of the box that reflect best practices for production and nonproduction environments.
  • Remove the need for domain knowledge in development teams. They can focus on deploying their applications to staging, dev, and production environments, rather than on Kubernetes cluster types.
  • Provide guard rails for the environment options teams can select to keep infrastructure in line with the organization's requirements.

You can customise certain cluster parameters. Depending on the policy applied by your Kore administrator, you can change certain parameters to meet your team's requirements.

Create a cluster using Kore CLI#

When building a cluster with the CLI you must specify a cloud account to use, and the account must be allocated to your team. To see what cloud accounts your team has allocated run:

kore get cloudaccounts -t teamname

Contact your Kore administrator if you do not have an allocated cloud account for the cloud you wish to use, and they can allocate one as shown in the Cloud Accounts Overview.

You can see the available cluster plans using kore get plans. If you wish to understand all of the parameters included in a plan, kore get plan plan-name -o yaml will show you the full detail of the plan.

To build a cluster using all of the values from the plan, use kore create cluster:

kore create cluster clustername -t teamname -p gke-development -a gcporg-name

If you need to specify any parameters, utilise the --param argument - remembering that only parameters which are permitted to be edited by the policies set up by the Kore administrators can be set:

kore create cluster clustername -t teamname -p gke-development -a gcporg-name --param authProxyAllowedIPs='["1.1.1.1/32","2,2,2,2"]'

You can list all of your team's clusters using kore get clusters -t teamname. If you wish to see more details about a specific cluster, try kore get cluster -t teamname clustername -o yaml.

Create a cluster using Kore Portal (UI)#

To build a cluster through the UI select Clusters > New Cluster from your team. This will prompt you to select the cloud you wish to use and let you choose from the available plans. If you do not see the cloud you wish to use, contact your Kore administrator to have one allocated to you.

Once you have selected a plan, expand Customize cluster parameters to adjust any parameters you need - note that any changes here are subject to the policies set up by the Kore administrators - enable Show read-only parameters to see those additional parameters that you cannot amend.

Create a namespace#

A namespace is the environment within a cluster where you will deploy your apps.

To create a namespace:

  1. In the Kore UI > Clusters page, click View on the cluster where you want to create the namespace.

    The Namespaces page is displayed.

  2. Click New namespace, enter a name, and then click Create namespace.

    Your new namespace is listed.

CLI: kore create namespace

Delete a namespace#

caution

Deleting a namespace deletes any deployed apps and resources in that namespace. We recommend that before you delete a namespace you run kubectl get services and kubectl get pods to see what is currently in the namespace. For more information on these commands, see the Kubernetes documentation.

To delete a namespace:

  1. In the Kore UI > Clusters page, click View on the cluster where you want to delete the namespace.
  2. Click Delete under the namespace you want to delete.

CLI: kore delete namespace

Last updated on Jun 24, 2021