Skip to content

Commit

Permalink
docs: Updated Stateful Pattern Readme to include validation of Velero (
Browse files Browse the repository at this point in the history
…#1771)

Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
  • Loading branch information
awshans and bryantbiggs committed Sep 22, 2023
1 parent e281f77 commit b932e7b
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions patterns/stateful/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ See [here](https://aws-ia.github.io/terraform-aws-eks-blueprints/getting-started

## Validate

For validating `velero` see [here](https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/main/modules/kubernetes-addons/velero#validate)
The following command will update the `kubeconfig` on your local machine and allow you to interact with your EKS Cluster using `kubectl` to validate the Velero deployment.

The following command will update the `kubeconfig` on your local machine and allow you to interact with your EKS Cluster using `kubectl` to validate the deployment.
1. Run `update-kubeconfig` command:

1. List the storage classes to view that `efs`, `gp2`, and `gp3` classes are present and `gp3` is the default storage class
```bash
aws eks --region <REGION> update-kubeconfig --name <CLUSTER_NAME>
```

2. List the storage classes to view that `efs`, `gp2`, and `gp3` classes are present and `gp3` is the default storage class

```sh
kubectl get storageclasses
Expand All @@ -59,7 +63,7 @@ The following command will update the `kubeconfig` on your local machine and all
gp3 (default) ebs.csi.aws.com Delete WaitForFirstConsumer true 2m19s
```

2. From an instance launched with instance store(s), check that the instance store has been mounted correctly. To verify, first install the `nvme-cli` tool and then use it to verify. To verify, you can access the instance using SSM Session Manager:
3. From an instance launched with instance store(s), check that the instance store has been mounted correctly. To verify, first install the `nvme-cli` tool and then use it to verify. To verify, you can access the instance using SSM Session Manager:

```sh
# Install the nvme-cli tool
Expand Down Expand Up @@ -87,7 +91,7 @@ The following command will update the `kubeconfig` on your local machine and all
nvme1n1 259:1 0 69.9G 0 disk /local1 # <--- this is the instance store
```

3. From an instance launched with multiple volume(s), check that the instance store has been mounted correctly. To verify, first install the `nvme-cli` tool and then use it to verify. To verify, you can access the instance using SSM Session Manager:
4. From an instance launched with multiple volume(s), check that the instance store has been mounted correctly. To verify, first install the `nvme-cli` tool and then use it to verify. To verify, you can access the instance using SSM Session Manager:

```sh
# Install the nvme-cli tool
Expand All @@ -105,7 +109,7 @@ The following command will update the `kubeconfig` on your local machine and all
/dev/nvme1n1 vol0ad3629c159ee869c Amazon Elastic Block Store 1 25.77 GB / 25.77 GB 512 B + 0 B 1.0
```

4. From the same instance used in step 4, check that the containerd directories are using the second `/dev/nvme1n1` volume:
5. From the same instance used in step 4, check that the containerd directories are using the second `/dev/nvme1n1` volume:

```sh
df /var/lib/containerd/
Expand All @@ -129,6 +133,35 @@ The following command will update the `kubeconfig` on your local machine and all
/dev/nvme1n1 24594768 2886716 20433380 13% /run/containerd
```

6. Test by listing velero resources provisioned:

```bash
kubectl get all -n velero

# Output should look similar to below
NAME READY STATUS RESTARTS AGE
pod/velero-b4d8fd5c7-5smp6 1/1 Running 0 112s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/velero ClusterIP 172.20.217.203 <none> 8085/TCP 114s

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/velero 1/1 1 1 114s

NAME DESIRED CURRENT READY AGE
replicaset.apps/velero-b4d8fd5c7 1 1 1 114s
```

7. Get backup location using velero [CLI](https://velero.io/docs/v1.8/basic-install/#install-the-cli)

```bash
velero backup-location get

# Output should look similar to below
NAME PROVIDER BUCKET/PREFIX PHASE LAST VALIDATED ACCESS MODE DEFAULT
default aws velero-ssqwm44hvofzb32d Available 2022-05-22 10:53:26 -0400 EDT ReadWrite true
```

## Destroy

{%
Expand Down

0 comments on commit b932e7b

Please sign in to comment.