LocalAI and k8sgpt #842
panneer-dev
started this conversation in
General
Replies: 1 comment 1 reply
-
I've updated the k8sgpt example - can you try it again? https://github.com/go-skynet/LocalAI/tree/master/examples/k8sgpt |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have both LocalAI and k8sgpt deployed in my kind cluster as per the example listed in the documentation and the pods are running without any errors in logs
When I try to apply the following object It throws the following errors. Am I missing something ?
kubectl apply -f - << EOF
apiVersion: core.k8sgpt.ai/v1alpha1
kind: K8sGPT
metadata:
name: k8sgpt-local-ai
namespace: default
spec:
backend: localai
baseUrl: http://local-ai.local-ai.svc.cluster.local:8080/v1
noCache: false
model: gpt-3.5-turbo
noCache: false
version: v0.3.0
enableAI: true
EOF
Error from server (BadRequest): error when creating "STDIN": 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"
Exec'ing into the local-ai pod I am able to hit the local-ai service
k exec -it -n local-ai local-ai-868f6544b9-nmz5x bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
Defaulted container544b9-nmz5x:/build# curl -kv http://local-ai.local-ai.svc.cluster.local:8080/v1
< HTTP/1.1 404 Not Found
< Date: Mon, 31 Jul 2023 00:34:34 GMT
< Content-Type: application/json
< Content-Length: 59
<
{"error":{"code":404,"message":"Cannot GET /v1","type":""}}root@local-ai-868f6544b9-nmz5x:/build# curl -kv http://local-ai.local-ai.svc.cluster.local:8080/v1/models
< HTTP/1.1 200 OK
< Date: Mon, 31 Jul 2023 00:34:38 GMT
< Content-Type: application/json
< Content-Length: 87
<
{"object":"list","data":[{"id":"WizardLM-7B-uncensored.ggmlv3.q5_1","object":"model"}]}root@local-ai-868f6544b9-nmz5x:/build#
Do not see much in the k8sgpt logs
k logs release-k8sgpt-operator-controller-manager-7dbbf7487-4vj75
2023-07-30T23:54:24Z INFO controller-runtime.metrics Metrics server is starting to listen {"addr": "127.0.0.1:8080"}
2023-07-30T23:54:24Z INFO setup starting manager
2023-07-30T23:54:24Z INFO starting server {"path": "/metrics", "kind": "metrics", "addr": "127.0.0.1:8080"}
2023-07-30T23:54:24Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
I0730 23:54:24.729476 1 leaderelection.go:245] attempting to acquire leader lease k8sgpt-operator-system/ea9c19f7.k8sgpt.ai...
I0730 23:54:24.735206 1 leaderelection.go:255] successfully acquired lease k8sgpt-operator-system/ea9c19f7.k8sgpt.ai
2023-07-30T23:54:24Z DEBUG events release-k8sgpt-operator-controller-manager-7dbbf7487-4vj75_5076426a-d4a5-475b-8f90-62084cb61d92 became leader {"type": "Normal", "object": {"kind":"Lease","namespace":"k8sgpt-operator-system","name":"ea9c19f7.k8sgpt.ai","uid":"62f77c2f-b959-4135-908f-6756555d37cc","apiVersion":"coordination.k8s.io/v1","resourceVersion":"7066"}, "reason": "LeaderElection"}
2023-07-30T23:54:24Z INFO Starting EventSource {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "source": "kind source: *v1alpha1.K8sGPT"}
2023-07-30T23:54:24Z INFO Starting Controller {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT"}
2023-07-30T23:54:24Z INFO Starting workers {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "worker count": 1}
Any idea on where the issue might be ?
Beta Was this translation helpful? Give feedback.
All reactions