Questions tagged [kubernetes-apiserver]

201 questions
2
votes
1 answer

Why am I getting "401 unauthorized" sometimes in gcloud API on GKE?

I have a google kubernetes cluster running and I am trying to manually scale some pods with the python-client kubernetes SDK. I use the following command on my terminal to get my google account credentials: gcloud auth login Next, I connect to my…
2
votes
0 answers

Tests fail when trying to list kubernetes CRD objects using ListOptions' Limit

I'm trying to list CRD objects using Limit as follows: ... someObjList := v1alpha1.SomeObjList{} _ = cl.List(ctx, &someObjList, client.InNamespace(lib.Namespace), &listOptions) When testing, I add 25 objects to a fake client then call the list…
2
votes
1 answer

Why K8s automounted service account token in a pod is different from the token retrieved directly from a service account?

Lets say I create a service account and retrieve the token associated to it: kubectl -n myexample describe sa myexample-sa kubectl describe secret myexample-sa-token-xxxxx Value of the token: token: …
Vahid
  • 1,625
  • 1
  • 18
  • 33
2
votes
1 answer

kube-apiserver: constantly 5 to 10% CPU: Although there is no single request

I installed kind to play around with Kubernetes. If I use top and sort by CPU usage (key C), then I see that kube-apiserver is constantly consuming 5 to 10% CPU. Why? I don't have installed something up to now: guettli@p15:~$ kubectl get pods…
guettli
  • 25,042
  • 81
  • 346
  • 663
2
votes
0 answers

k8s code-generator must in $GOPATH/src and use fixed /?

I use the code-generator to produce a sample clientset for testing. My go version is go version go1.17.5 linux/amd64. If I install the code-generator in this way go install k8s.io/code-generator@v0.23.2-rc.0, then run the command like below. It…
Pzhang
  • 193
  • 2
  • 14
2
votes
1 answer

Exposing kubernetes API to the outside world

I was reviewing some material related to kubernetes security and I found it is possible to expose Kubernetes API server to be accessible from the outside world, My question is what would be the benefit from doing something vulnerable like this,…
2
votes
1 answer

Kubernetes API Gateway for Microservice deployment

I am trying to understand the Kubernetes API Gateway for my Microservices. I have multiple microservices and those are deployed with the Kubernetes deployment type along with its own services. I also have a front-end application that basically tries…
2
votes
2 answers

what's the meaning of apiVersion of batch/v1beta1

I'm confused with the following response. what's the meaning of "apiVersion": "v1",??? I'm expecting the apiVersion to be v1beta1. $ curl http://127.0.0.1:8080/apis/batch/v1beta1 { "kind": "APIResourceList", "apiVersion": "v1", "groupVersion":…
ooocamel
  • 33
  • 5
2
votes
1 answer

How to get status of custom resource using Kubernetes C# .net Client?

I have created an Elasticsearch resource using the below yaml manifest after installing the eck-operator as mentioned here. apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: quickstart spec: version: 7.15.0 …
Jerald Baker
  • 1,121
  • 1
  • 12
  • 48
2
votes
2 answers

What is node/proxy subresource in kubernetes?

You can find mentions of that resource in the following Questions: 1, 2. But I am not able to figure out what is the use of this resource.
yash thakkar
  • 121
  • 1
  • 1
  • 7
2
votes
1 answer

In what use case kubectl --api-version option is helpful

There is only 1 version per object in k8s 1.20 as can be checked by command: kubectl api-resources Also, creating custom objects with different versions is not allowed. AlreadyExists is thrown on trying. In what use cases providing --api-version…
aaa
  • 118
  • 1
  • 7
2
votes
1 answer

How to edit etcd configuration in an existing bare metal kubernetes cluster

I have a standalone Kuberenets cluster installed on some physical RHEL machine. I'm experiencing recurring crashes of etcd and kube-apiserver containers. From their logs, I managed to guess that I need to tune etcd to better perform in this…
Mugen
  • 8,301
  • 10
  • 62
  • 140
2
votes
2 answers

How do I update an on-premise Kubernetes API server to enable OIDC with Dex?

We have an on-premise kubernetes deployment in our data center. I just finished deploying the pods for Dex, configured hooked up with our LDAP server to allow LDAP based authentication via Dex, ran tests and was able to retrieve the OpenID connect…
2
votes
1 answer

How to handle a stream response using the Kubernetes API?

When I ssh directly inside my pod, and run the following on the command line: curl -v --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"…
2
votes
0 answers

'kubectl top pods' Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io)

When I am trying to run kubectl top nodes I`m getting the output: Error from server (ServiceUnavailable): the server is currently unable to handle the request (get nodes.metrics.k8s.io) Metric server is able to scrape the metrics, in the logs…