Skip to main content
  1. Blog/

How to install Kasten K10 at Google GKE

··1358 words·7 mins·
Author
Marco Escobar
Data protection, Kubernetes, cybersecurity and AI. Hands-on guides from the trenches: Veeam, Kasten, VMware, Oracle, cloud, and whatever I’m breaking in the homelab this week.
Table of Contents
How to install Kasten K10 at Google GKE — screenshot 1

According to the latest surveys by cncf.io and other companies, one of the most used services is Google Kubernetes Engine, GKE, therefore, as expected, it is always necessary to protect the applications that run on these types of services, as well as the use of Google’s infrastructure to store backups. In this guide we will see how to install Kasten K10 to protect applications running on GKE and also integrate it with K10 Multi-Cluster Manager.

First steps
#

As always we must visit the official documentation of Kasten K10 to install the solution on Google Kubernetes Engine:

After reading the documentation we will confirm how easy it is to install Kasten K10 at Google Kubernetes Engine, since the recommendation is to install it with a service account (Service Account), since Kasten You need two types of service accounts, one to access Google’s infrastructure, such as storage, and one to access Google resources. kubernetes. We will review the option of a separate service account as it is the recommendation and good practice to perform application protection in GKE

Google Cloud Service Account Creation
#

First we will make sure that we are in the Google Cloud console and we have access to the Cluster GKE:

How to install Kasten K10 at Google GKE — screenshot 2

Then we will access the Google “Cloud Shell” by clicking on the “Prompt” icon to the left of the question mark in the upper right side of the Google console:

How to install Kasten K10 at Google GKE

Then we will execute the following command to access the cluster GKE:

gcloud container clusters get-credentials NombreMiClusterGKE --zone ZonaGoogle

```bash

Where you should enter the name of your cluster GKE and the area where you configured it, for example in this case, the cluster name is “demo-gke-k10” and the zone is “us-central1-c”:



How to install Kasten K10 at Google GKE — screenshot 3
With this, we ensure the configuration of the kubeconfig file in .kube/config for management via kubectl, if we execute the following command we will see the nodes running in GKE: ```bash kubectl get nodes -o wide ```bash
How to install Kasten K10 at Google GKE — screenshot 4
We are now ready to generate the service account. Important, the permissions that we will need to add to the service account will be: - roles/compute.storageAdmin for access to Google infrastructure - roles/storage.admin for access to buckets for backup in Google Cloud Storage \\*\\*\\* According to the security of each company you can segment storage.admin permissions \*\*\* Therefore, as indicated in the documentation of Kasten We will proceed to execute the following commands in the Google Cloud Shell: ```bash myproject=$(gcloud config get-value core/project) gcloud iam service-accounts create k10-sa --display-name "K10 Service Account" k10saemail=$(gcloud iam service-accounts list --filter "k10-sa" --format="value(email)") gcloud iam service-accounts keys create --iam-account=${k10saemail} k10-sa-key.json gcloud projects add-iam-policy-binding ${myproject} --member serviceAccount:${k10saemail} --role roles/compute.storageAdmin ```bash We will then add the permissions for bucket access, because this could be the same service account or another that is used exclusively to access Google Cloud Storage buckets. To validate we can go to "IAM" within the Google Cloud console and confirm the creation of the service account:
How to install Kasten K10 at Google GKE — screenshot 5
As seen in the previous image we observe that there is “k10-sa@inspiring-cat-342913.iam.gserviceaccount.com” which is the service account that has been created earlier with the executed commands and then we will edit the account, in this case, to use it to also access Google Cloud Storage, we will add the Storage.Admin role to the service account:
How to install Kasten K10 at Google GKE — screenshot 6
And we can validate that the necessary role has been assigned:
How to install Kasten K10 at Google GKE — screenshot 7
## Installation of Kasten K10 If we follow the documentation of Kasten K10, for the installation, we must always review the prerequisites that I mentioned at the beginning of this post, we will add the helm repository and create the namespace for kasten, by name "kasten-io” with the following commands: ```bash helm repo add kasten https://charts.kasten.io/ kubectl create namespace kasten-io ```bash With the above created, we proceed to install Kasten K10 with the service account that we created previously and its respective key with the following commands: ```bash sa_key=$(base64 -w0 k10-sa-key.json) helm install k10 kasten/k10 --namespace=kasten-io --set secrets.googleApiKey=$sa_key ```bash
How to install Kasten K10 at Google GKE — screenshot 8
Finally we check that all the pods of the namespace are in "RUNNING": ```bash kubectl get pods -n kasten-io ```bash Now we need to access the web console of Kasten and since we have configured it several times in this blog, we only have to execute the command: ```bash helm upgrade k10 kasten/k10 --namespace=kasten-io \ --reuse-values \ --set externalGateway.create=true \ --set auth.tokenAuth.enabled=true ```bash Again we validate that the pods of the namespace of kasten is in “RUNNING” and then we review the service that has been created to access the console with the following command: ```bash kubectl get svc -n kasten-io ```bash
How to install Kasten K10 at Google GKE — screenshot 9
And we see that in this case I have assigned the IP: 34.121.31.71 as "LoadBalancer", we will enter the web with http://34.121.31.71/k10/ # /
How to install Kasten K10 at Google GKE — screenshot 10
And the credential is obtained from the token, as we saw in a previous post in this blog, we just have to execute: ```bash sa_secret=$(kubectl get serviceaccount k10-k10 -o jsonpath="{.secrets[0].name}" --namespace kasten-io) kubectl get secret $sa_secret --namespace kasten-io -ojsonpath="{.data.token}{'\n'}" | base64 --decode ```bash
How to install Kasten K10 at Google GKE — screenshot 11
And it will show us the token to enter:
How to install Kasten K10 at Google GKE — screenshot 12
## Configuration Infrastructure Google We already mentioned that Kasten you need access to Google infrastructure as well as Google Cloud Storage to host the backups, since we configure with the service account, the infrastructure profile is generated in Kasten automatically, to validate, we can see it in the configuration of the cluster of Kasten “Settings” and then in “Infrastructure”:
How to install Kasten K10 at Google GKE — screenshot 13
We only need to add the backup repository with a Google Cloud Storage bucket, we will create the Google bucket in the standard way and then from kasten enter the following data:
How to install Kasten K10 at Google GKE — screenshot 14
To generate the service key, we enter "IAM", then "Service Accounts", we select the service account of Kasten what we create”k10-sa”, click on “Keys” and we generate one in json format:
How to install Kasten K10 at Google GKE — screenshot 15
Where: - Profile Name: Profile name - Cloud Storage Provider: We select Google Cloud Storage - GCP Project ID: We take the name of the Google Project ID in this case “inspiring-cat-342913” - GCP Service key: We copy the content of the json that we generated previously - Location: Location of the bucket when it was generated or you can see it in the bucket properties - Bucket Name: Name of the previously created bucket And now we are ready to make backups. ## Integration with K10 Multi Cluster Manager In the next post we will see how to integrate our cluster GKE with K10 Multi-Cluster manager, if you need to install K10 Multi-Cluster: > [Install Kasten Multi Cluster Manager](/en/install-kasten-multi-cluster-manager/) /instalar-kasten-multi-cluster-manager/embed/#?secret=cygiegwj0g#?secret=YFsOO0bgjS And in this case for Google, we must execute k10multicluster to modify the kubeconfig of the cluster. To copy the cluster's kubeconfig GKE, we must execute in the “Cloud Shell”: ```text cat .kube/config ```bash We entered our primary cluster of kubernetes for Kasten, and enter the route: ```text cd cd .kube/ ```text And we will generate a file with nano named google to paste the content of the kubeconfig: ```text nano google ```bash
How to install Kasten K10 at Google GKE — screenshot 16
We set it as environment variable in your profile and you can list the contexts of kubernetes: ```bash kubectl config get-contexts ```json
How to install Kasten K10 at Google GKE — screenshot 17
And we focus on the context of Google, in this case gke\_inspiring-cat-342913\_us-central1-c\_demo-gke-k10 and we will execute the following command (remember to set the context of your cluster): ```text k10multicluster kubeconfig prepare --context gke_inspiring-cat-342913_us-central1-c_demo-gke-k10
How to install Kasten K10 at Google GKE — screenshot 18

We copy the created file content to our K10 multi-cluster,

  • Cluster Display Name: name that we want to display the cluster
  • Ingress URL: Address of the console Kasten en GKE
  • K10 Namespace: Name of the namespace where it was installed Kasten
  • Helm release name: k10
  • Insecure TLS: If you use http, disable it, otherwise use SSL with a valid certificate.
How to install Kasten K10 at Google GKE — screenshot 19

And we already have our Google cluster GKE centrally managed.

How to install Kasten K10 at Google GKE — screenshot 20

Recommendations
#

As always, security comes first, applying access only through trusted addresses as well as applying RBAC to access via Multi-Cluster Manager and of course if necessary applying permissions to service accounts with the minimum access for operation.

Related posts#

Related