Open panneer-dev opened 9 months ago
Please use a more recent version of K8sGPT, the Custom Resource has changed quite largely from the 0.0.26 implementation.
Here are the operator docs with guidance https://docs.k8sgpt.ai/getting-started/in-cluster-operator/
Thanks I tried with the latest 0.0.27 of the in cluster operator helm chart and I am getting the same message while I apply the K8sGPT CR. Was there a specific version you wanted me to use ? Also is there a k8s version dependency?
It looks like the custom resource isnt installed. Can you confirm you see k8sgpt
in the customresourcedefinitions list?
Checklist
Affected Components
K8sGPT Version
0.0.26
Kubernetes Version
1.26.6
Host OS and its Version
MacOS 14.0
Steps to reproduce
Install k8sgpt-operator after pulling down k8sgpt-operator-0.0.26.tgz helm install k8sgpt-operator k8sgpt-operator Pod is running fine and CRD is created
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES k8sgpt-operator-controller-manager-b8fd4897d-bj4q2 2/2 Running 0 2m26s 10.244.0.6 k8saiold-control-plane
kubectl api-versions | grep -i gpt core.k8sgpt.ai/v1alpha1
Applying the following manifest for local learning apiVersion: core.k8sgpt.ai/v1alpha1 kind: K8sGPT metadata: name: k8sgpt-local namespace: k8sai spec: backend: localai
use the same model name here as the one you plugged
into the LocalAI helm chart's values.yaml
model: ggml-gpt4all-j.bin
kubernetes-internal DNS name of the local-ai Service
baseUrl: http://local-ai.local-ai.svc.cluster.local:8080/v1
allow K8sGPT to store AI analyses in an in-memory cache,
otherwise your cluster may get throttled :)
noCache: false version: v0.2.7 enableAI: true
k apply -f gpt-local.yaml
Error from server (BadRequest): error when creating "gpt-local.yaml": K8sGPT in version "v1alpha1" cannot be handled as a K8sGPT: strict decoding error: unknown field "spec.backend", unknown field "spec.baseUrl", unknown field "spec.enableAI", unknown field "spec.model"
Expected behaviour
Expecting the k8sgpt resource k8sgpt-local to be created with the manifest
Actual behaviour
Error from server (BadRequest): error when creating "gpt-local.yaml": K8sGPT in version "v1alpha1" cannot be handled as a K8sGPT: strict decoding error: unknown field "spec.backend", unknown field "spec.baseUrl", unknown field "spec.enableAI", unknown field "spec.model"
Additional Information
No response