https://k8s_api_server/api/v1/namespaces/default/pods?limit=500
kubernetes_api_task = Task(
description=
("You received the {request_type} request to the following API endpoint:\n"
"{api_endpoint}\n\n"
"You should provide the response as if you are a real Kubernetes API. You can imagine resources as we are doing it for educational purposes.\n"
"You can produce responses with 1 to 5 resources in them. In 5% of cases you can provide a proper response that indicates that resources do not exist.\n"
),
expected_output=
("A response to the API request mimicking the response of the real Kubernetes API server. Use creative names for Kubernetes resources.\n"
),
agent=kubernetes_api_agent)
# Agent: Kubernetes API simulator
## Final Answer:
```json
{
"kind": "PodList",
"apiVersion": "v1",
"metadata": {
"resourceVersion": "12345"
},
"items": [
{
"metadata": {
"name": "mypod-78997",
"namespace": "default",
"uid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"resourceVersion": "56789",
"creationTimestamp": "2024-01-01T12:00:00Z",
"labels": {
"app": "myapp"
}
…
Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority
E0314 15:34:42.669635 19999 memcache.go:265] couldn't get current server API group list: the server could not find the requested resource
GET /api?timeout=32s
GET /apis?timeout=32s
GET /apis/autoscaling.x-k8s.io/v1beta1?timeout=32s
GET /apis/autoscaling.x-k8s.io/v1?timeout=32s
E0314 17:05:00.114678 40194 memcache.go:287] couldn't get resource list for node.k8s.io/v1: converting (v1.APIGroup) to (v1.APIResourceList): unknown conversion
curl –server="https://you_real_k8s" –token=”token" /apis
curl –server=”https://you_real_k8s” –token=”token" /apis/path/to/crd
curl -H “Authorization: Bearer TOKEN” \
https://api.kais.im/cache \
-d ‘{“api_path”: “/api”, “response”: “YOUR RESPONSE}’