Skip to content

Commit 009e60f

Browse files
authored
docs: standardize and clarify Markdown documentation formatting (#560)
- Update section headings to use consistent Markdown formatting - Improve readability by adding newlines and splitting long lines - Enhance instructions for running Docker container with clearer command examples and multiline formatting - Correct typo in the alternative terminal UI section header Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent 00478f2 commit 009e60f

File tree

1 file changed

+33
-14
lines changed

1 file changed

+33
-14
lines changed

CONTAINER.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,68 @@
1-
# 1. Build the Docker Image
1+
# Running kubectl-ai in a Docker Container
22

3-
First, clone the `kubectl-ai` repository and build the Docker image from the source code.
3+
## 1. Build the Docker Image
4+
5+
First, clone the `kubectl-ai` repository and build the Docker image from the
6+
source code.
47

58
```bash
69
git clone https://github.com/GoogleCloudPlatform/kubectl-ai.git
710
cd kubectl-ai
811
docker build -t kubectl-ai:latest -f images/kubectl-ai/Dockerfile .
912
```
1013

11-
# 2. Running against a GKE cluster
12-
To access a GKE cluster, `kubectl-ai` needs two configurations from your local machine: **Google Cloud credentials** and a **Kubernetes config file**.
14+
## 2. Running against a GKE cluster
15+
16+
To access a GKE cluster, `kubectl-ai` needs two configurations from your local
17+
machine: **Google Cloud credentials** and a **Kubernetes config file**.
1318

14-
## Create Google Cloud Credentials
19+
### Create Google Cloud Credentials
1520

16-
First, create Application Default Credentials [(ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). `kubectl` uses these credentials to authenticate with your GKE cluster.
21+
First, create Application Default Credentials
22+
[(ADC)](https://cloud.google.com/docs/authentication/application-default-credentials).
23+
`kubectl` uses these credentials to authenticate with your GKE cluster.
1724

1825
```bash
1926
gcloud auth application-default login
2027
```
2128

2229
This command saves your credentials into the `~/.config/gcloud` directory.
2330

24-
## Configure `kubectl`
31+
### Configure `kubectl`
2532

26-
Next, generate the `kubeconfig` file. This file tells `kubectl` which cluster to connect to and to use your ADC credentials for authentication.
33+
Next, generate the `kubeconfig` file. This file tells `kubectl` which cluster
34+
to connect to and to use your ADC credentials for authentication.
2735

2836
```bash
2937
gcloud container clusters get-credentials <cluster-name> --location <location>
3038
```
3139

3240
This updates the configuration file at `~/.kube/config`.
3341

34-
# 3. Running the Container
42+
## 3. Running the Container
3543

36-
Finally, mount both configuration directories into the `kubectl-ai` container when you run it.
37-
This example shows how to run `kubectl-ai` with a web interface, mounting all necessary credentials and providing a Gemini API key.
44+
Finally, mount both configuration directories into the `kubectl-ai` container
45+
when you run it. This example shows how to run `kubectl-ai` with a web
46+
interface, mounting all necessary credentials and providing a Gemini API key.
3847

3948
```bash
4049
export GEMINI_API_KEY="your_api_key_here"
41-
docker run --rm -it -p 8080:8080 -v ~/.kube:/root/.kube -v ~/.config/gcloud:/root/.config/gcloud -e GEMINI_API_KEY kubectl-ai:latest --ui-listen-address 0.0.0.0:8080 --ui-type web
50+
docker run --rm -it -p 8080:8080 \
51+
-v ~/.kube:/root/.kube \
52+
-v ~/.config/gcloud:/root/.config/gcloud \
53+
-e GEMINI_API_KEY \
54+
kubectl-ai:latest \
55+
--ui-listen-address 0.0.0.0:8080 \
56+
--ui-type web
4257
```
4358

44-
Alternativley with the default terminal ui:
59+
Alternatively with the default terminal ui:
4560

4661
```bash
4762
export GEMINI_API_KEY="your_api_key_here"
48-
docker run --rm -it -v ~/.kube:/root/.kube -v ~/.config/gcloud:/root/.config/gcloud -e GEMINI_API_KEY kubectl-ai:latest
63+
docker run --rm -it \
64+
-v ~/.kube:/root/.kube \
65+
-v ~/.config/gcloud:/root/.config/gcloud \
66+
-e GEMINI_API_KEY \
67+
kubectl-ai:latest
4968
```

0 commit comments

Comments
 (0)