Skip to content

Commit

Permalink
Merge pull request #95 from amitamrutiya2210/aws
Browse files Browse the repository at this point in the history
docs: add documentation for AWS integration provider
  • Loading branch information
AlexsJones committed Mar 12, 2024
2 parents c21beb3 + 406ff0c commit fa5a6cc
Showing 1 changed file with 61 additions and 4 deletions.
65 changes: 61 additions & 4 deletions docs/reference/cli/filters.md
Expand Up @@ -51,11 +51,11 @@ Once the Trivy Operator is installed inside the cluster, K8sGPT will have access
```bash
❯ k8sgpt filters list

Active:
Active:
> VulnerabilityReport (integration)
> Pod
> ConfigAuditReport (integration)
Unused:
Unused:
> PersistentVolumeClaim
> Service
> CronJob
Expand Down Expand Up @@ -125,7 +125,7 @@ Once activated, K8sGPT will have access to new filters:
```bash
❯ k8sgpt filters list

Active:
Active:
> PersistentVolumeClaim
> Service
> ValidatingWebhookConfiguration
Expand All @@ -140,7 +140,7 @@ Active:
> StatefulSet
> PrometheusConfigReport
> ReplicaSet
Unused:
Unused:
> HorizontalPodAutoScaler
> PodDisruptionBudget
> NetworkPolicy
Expand Down Expand Up @@ -207,6 +207,63 @@ at least one of the following label sets:
Note: the LLM prompt includes a subset of your Prometheus relabeling rules to
avoid using too many tokens, so you may not see every label set in the output.

## AWS

The AWS Operator is a tool that allows Kubernetes to manage AWS resources directly, making it easier to integrate AWS services with other Kubernetes applications. This integration helps K8sGPT to interact with the AWS resources managed by the Operator. As a result, you can use K8sGPT to analyze and manage not only your Kubernetes resources but also your AWS resources that are under the management of the AWS Operator.

Activate the AWS integration:
```bash
k8sgpt integration activate aws
```
Once activated, you should see the following success message displayed:
```
Activated integration aws
```

This will activate the AWS Kubernetes Operator into the Kubernetes cluster and make it possible for K8sGPT to interact with the results of the Operator.

Once the AWS integration is activated inside the cluster, K8sGPT will have access to EKS:
```bash
❯ k8sgpt filters list

Active:
> StatefulSet
> Ingress
> Pod
> Node
> ValidatingWebhookConfiguration
> Service
> EKS (integration)
> PersistentVolumeClaim
> MutatingWebhookConfiguration
> CronJob
> Deployment
> ReplicaSet
Unused:
> Log
> GatewayClass
> Gateway
> HTTPRoute
> HorizontalPodAutoScaler
> PodDisruptionBudget
> NetworkPolicy
```

More information can be found on the official [AWS-Operator documentation](https://aws.amazon.com/blogs/opensource/aws-service-operator-kubernetes-available/).

### Using the new filters to analyze your cluster

Any of the filters listed in the previous section can be used as part of the `k8sgpt analyze` command.

> **Note:** Ensure the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables are set as outlined in the [AWS CLI environment variables documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html).
To use the `EKS` filter from the AWS integration, specify it with the --filter flag:
```bash
k8sgpt analyze --filter EKS
```

This command analyzes your cluster's EKS resources using K8sGPT. Make sure your EKS cluster is working in the specified namespace. The report's results will vary based on the EKS reports available in your cluster.

## Adding and removing default filters

_Remove default filters_
Expand Down

0 comments on commit fa5a6cc

Please sign in to comment.