Skip to content

Commit

Permalink
minor changes2
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshit8 committed Feb 24, 2021
1 parent 738e7f3 commit ca6f281
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ For installing kind:

**CAUTION** 🛑 🛑 :
- Make sure Docker is installed on your machine.
- If you are using Kubernetes(version 1.17), do check if **coredns** is working. For verifying status of coredns click [here](https://stackoverflow.com/questions/53075796/coredns-pods-have-crashloopbackoff-or-error-state).
- If you are using Kubernetes(version **1.17**), do check if **coredns** is working. For verifying status of coredns click [here](https://stackoverflow.com/questions/53075796/coredns-pods-have-crashloopbackoff-or-error-state).

## Service account for terraform and velero
## Service account for Terraform and Velero
Instructions for creating a service account with necessary permission [here](../gcpServiceAccount/README.md).

## Setting up storage plugin for velero
Velero requires a storage site for pushing back-up files and retrieving them back in case of restoration. We'll be using **Google cloud storage bucket** for this tutorial, but you can explore wide variety of storage plugin offered by velero [here](https://velero.io/plugins/).
## Setting up storage plugin for Velero
Velero requires a storage site for pushing back-up files and retrieving them back in case of restoration. We'll be using **Google cloud storage bucket** for this tutorial, but you can explore wide variety of storage plugin offered by Velero [here](https://velero.io/plugins/).

### Creating a storage bucket with terraform
You can grab **Terraform** CLI from [here](https://www.terraform.io/downloads.html) or else use a Docker container that comes pre-installed with terraform. The infrastructure files for terraform are placed inside [storage](./storage) folder. Make sure your `credentials.json` is present inside `gcpServiceAccount` folder
### Creating a storage bucket with Terraform
You can grab **Terraform** CLI from [here](https://www.terraform.io/downloads.html) or else use a Docker container that comes pre-installed with terraform. The infrastructure files for terraform are placed inside [storage](./storage) folder. Make sure your `credentials.json` is present inside `gcpServiceAccount` folder.

```bash
docker run -it --rm -v ${PWD}/storage:/storage -w /storage akshit8/terraform
Expand All @@ -42,7 +42,7 @@ If no error is thrown, you'll be able to see a newly created bucket in your clou

<img src="assets/storagetf.png">

## Test cluster(v 1.18)
## Test cluster with Kind(version 1.18)
With storage bucket in place, let us create a `test-cluster` with Kubernetes version **1.18**

```bash
Expand All @@ -57,7 +57,7 @@ To install both CLI's we can use a **Debian** Docker container.
```bash
docker run -it --rm -v ${HOME}:/root/ -v ${PWD}:/work -w /work --net host debian:buster
```
mounting **$HOME** directory provides access to **KUBE_CONFIG** generated by Kind cli.
mounting **$HOME** directory provides access to **KUBE_CONFIG** generated by Kind CLI.

- Installing Kubectl
```bash
Expand Down Expand Up @@ -103,7 +103,7 @@ kubectl -n sample apply -f ./k8s-objects

## Configuring Velero for backing-up sample namespace

- Using Velero CLI installed previously, we need to deploy some components(that velero use) inside our cluster and configure them, so that Velero can access our *cloud storage bucket*.
Using Velero CLI installed previously, we need to deploy some components(that velero use) inside our cluster and configure them, so that Velero can access our *cloud storage bucket*.

```bash
# setting the bucket name
Expand Down
4 changes: 2 additions & 2 deletions gcpServiceAccount/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## GCP service account to use with terraform and velero
## GCP service account to use with Terraform and Velero
A service account that has admin access to `google cloud storage` is required for **Terraform** to provision a bucket and for **Velero** to read/write backups to this bucket. <br>
Open [google cloud console](https://console.cloud.google.com) and navigate to `IAM & Admin`>`Service accounts`
- create a new service account.
- Create a new service account.
- Give `cloud storage admin` permission to this account.
- Create a key for this account in `json` format and download it.
- Rename it to `credentials.json` and place it inside this folder.

0 comments on commit ca6f281

Please sign in to comment.