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

fix: add missing namespace in getting started instructions #127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

codefromthecrypt
Copy link

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.

$ 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.

$ 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": ""
  }
}

Closes #

📑 Description

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

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 <[email protected]>
Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for meek-marigold-103c48 ready!

Name Link
🔨 Latest commit 59ba59d
🔍 Latest deploy log https://app.netlify.com/sites/meek-marigold-103c48/deploys/6708b7ca1ca44f0008edab65
😎 Deploy Preview https://deploy-preview-127--meek-marigold-103c48.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codefromthecrypt codefromthecrypt changed the title add missing namespace in getting started instructions fix: add missing namespace in getting started instructions Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant