Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added azure and gcs cache integration guide #91

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 74 additions & 1 deletion docs/explanation/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,80 @@ _Removing the Remote Cache_:
If users wish to remove the remote cache without deleting the associated AWS S3 bucket, they can use the following command:

```
k8sgpt cache remove --bucket <name>
k8sgpt cache remove
Copy link
Member

@AnaisUrlichs AnaisUrlichs Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

users don't need to specify the resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, without specifying any resource, it will select the current active cache and convert it into a file-based cache. I have also checked the K8sGPT code and confirmed that there are no other flags present like --bucket on the cache remove command.

```

This command ensures that the cache items are removed from the K8sGPT CLI, but the bucket and its contents in AWS S3 will remain intact for potential future usage.


## Azure Blob Storage Integration
K8sGPT offers integration with **Azure Blob Storage**, a scalable and cost-effective object storage solution provided by **Microsoft Azure**.

### Prerequisites
Before using the remote caching feature with Azure Blob Storage in K8sGPT, ensure you have the following prerequisites set up:

- `AZURE_STORAGE_ACCOUNT`: An Azure storage account is required to authenticate with azure CLI programmatically.

_Adding a Remote Cache_:

Users can add a remote cache to the K8sGPT CLI by executing the following command:

```
k8sgpt cache add --azure --storage <azure storage account name> --container <container name>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add where to find both the and the container
It might be obvious but better to be 100% clear which information we need here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, here, could you please add what the user is supposed to see once they have run the command?

```

This command will create a new container in the specified Azure Storage Account if it does not already exist. The created container will serve as the remote cache for K8sGPT.

_Listing Cache Items_:

To view the items stored in the remote cache, users can use the following command:

```g
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove g

k8sgpt cache list
```

_Removing the Remote Cache_:

If users wish to remove the remote cache without deleting the associated Azure Blob Storage container, they can use the following command:

```
k8sgpt cache remove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add what the user is supposed to see e.g. is there a confirmation message?

```

This command ensures that the cache items are removed from the K8sGPT CLI, but the container and its contents in Azure Blob Storage will remain intact for potential future usage.

## Google Cloud Storage (GCS) Integration
K8sGPT integrates with **Google Cloud Storage (GCS)**, a highly available and durable object storage service provided by **Google Cloud Platform.**

### Prerequisites
Before using the remote caching feature with Google Cloud Storage in K8sGPT, ensure you have the following prerequisites set up:

- `GOOGLE_CLOUD_STORAGE_ACCOUNT`: An Google Cloud Storage Account is required to authenticate with gcloud CLI programmatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once I run the K8s GPT command that will trigger the authentication with the the glcloud CLI?

k8sgpt cache add --gcs --bucket --region --projectid

Could we add a verification step -- e.g. describing in a few words what users are supposed to see?


_Adding a Remote Cache_:

Users can add a remote cache to the K8sGPT CLI by executing the following command:

```
k8sgpt cache add --gcs --bucket <bucket name> --region <region name> --projectid <project id>
```

This command will create a new bucket in the specified Google Cloud Storage project if it does not already exist. The created bucket will serve as the remote cache for K8sGPT.

_Listing Cache Items_:

To view the items stored in the remote cache, users can use the following command:

```
k8sgpt cache list
```

_Removing the Remote Cache_:

If users wish to remove the remote cache without deleting the associated Google Cloud Storage bucket, they can use the following command:

```
k8sgpt cache remove
```

This command ensures that the cache items are removed from the K8sGPT CLI, but the bucket and its contents in Google Cloud Storage will remain intact for potential future usage.