Skip to content

Commit

Permalink
add missing namespace in getting started instructions
Browse files Browse the repository at this point in the history
I went through the getting started guide and followed the directions, but got to the end and had to think about why it didn't produce any results.

```bash
$ kubectl get results -o json | jq .
{
  "apiVersion": "v1",
  "items": [],
  "kind": "List",
  "metadata": {
    "resourceVersion": ""
  }
}
```

What was missing was the namespace of where the operator was deployed to. When you add that, the getting started ends successfully.

```bash
$ kubectl get results -o json -n k8sgpt-operator-system | jq .
{
  "apiVersion": "v1",
  "items": [
    {
      "apiVersion": "core.k8sgpt.ai/v1alpha1",
      "kind": "Result",
      "metadata": {
        "creationTimestamp": "2024-10-11T05:22:34Z",
        "generation": 1,
        "labels": {
          "k8sgpts.k8sgpt.ai/backend": "openai",
          "k8sgpts.k8sgpt.ai/name": "k8sgpt-sample",
          "k8sgpts.k8sgpt.ai/namespace": "k8sgpt-operator-system"
        },
        "name": "defaultbrokenpod",
        "namespace": "k8sgpt-operator-system",
        "resourceVersion": "680",
        "uid": "7ef2909e-bdf4-49bd-b99d-d075547b0992"
      },
      "spec": {
        "backend": "openai",
        "details": "Error: Failed to pull image \"nginx:1.a.b.c\".\nSolution: Step 1: Check if the image \"nginx:1.a.b.c\" exists. Step 2: Verify your Docker repository credentials. Step 3: Ensure network connectivity to the registry.",
        "error": [
          {
            "text": "Back-off pulling image \"nginx:1.a.b.c\""
          }
        ],
        "kind": "Pod",
        "name": "default/broken-pod",
        "parentObject": ""
      },
      "status": {
        "lifecycle": "historical"
      }
    }
  ],
  "kind": "List",
  "metadata": {
    "resourceVersion": ""
  }
}
```

Signed-off-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
  • Loading branch information
codefromthecrypt authored Oct 11, 2024
1 parent 3978c90 commit 59ba59d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/getting-started/in-cluster-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ _It should also be noted that `localai` and `azureopenai` are supported and in-c
Once the initial scans have been completed after several minutes, you will be presented with results custom resources.

```bash
❯ kubectl get results -o json | jq .
❯ kubectl get results -n k8sgpt-operator-system -o json | jq .
{
"apiVersion": "v1",
"items": [
Expand Down

0 comments on commit 59ba59d

Please sign in to comment.