Questions tagged [kubernetes-apiserver]

201 questions
3
votes
1 answer

How can i install deleted default api service in kubernetes?

I am on Kubernetes v1.22.13. When i was trying to delete a namespace that's stuck in status terminating, i deleted api-service v1.networking.k8s.io by mistake with: kubectl delete apiservices.apiregistration.k8s.io v1.networking.k8s.io And now i…
miador
  • 358
  • 1
  • 5
  • 20
3
votes
1 answer

Using client-go to explain a resource

Using kubectl I can show documentation for a resource using explain: kubectl explain storageclass Is there similar functionality available with client-go?
Trevor
  • 6,659
  • 5
  • 35
  • 68
3
votes
1 answer

See Every Configuration Field (a Schema?) for Kubernetes REST Objects

I'm new to Kubernetes (K8s). It's my understanding that in order to "do things" in a kubernetes cluster, we interact with a kuberentes REST API endpoint and create/update/delete objects. When these objects are created/updated/deleted K8s will see…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
3
votes
1 answer

ValueError: Invalid value for selector, must not be None

I'm pretty new to Kubernetes and I have to create a pod using Kubernetes python-client. So to experiment around I'm trying to run examples notebooks provided by the project without any change to see how things works. Starting with…
FooBar
  • 55
  • 1
  • 9
3
votes
2 answers

Kubernetes API create deployment failed

https://github.com/kubernetes-client/python/blob/master/examples/ingress_create.py Above is the link I refer to test3.py: import yaml from kubernetes import client, config config.load_kube_config() txt = "" with…
Layne Wu
  • 87
  • 8
3
votes
1 answer

API endpoints for kubernetes mutating webhook server

As described here, this is a reference implementation of a webhook server as used in kubernetes e2e test. In the main function, a number of endpoints have been defined to handle different requests for mutation. However, there is no clear…
cogitoergosum
  • 2,309
  • 4
  • 38
  • 62
3
votes
2 answers

Permanently replacing API server certificates

I have microK8S cluster, and expose the API server at my domain. The server.crt and server.key in /var/snap/microk8s/1079/certs need to be replaced with the ones that include my domain. Otherwise, as expected, i get the error: Unable to connect to…
Vladimir Akopyan
  • 644
  • 8
  • 16
3
votes
1 answer

kubernetes: validating a yaml file against a custom resource

Assuming I have a custom resource on my k8s cluster exposed on a proprietary api endpoint, e.g. somecompany/v1 Is there a way to validate a .yaml manifest describing this resource? It his a functionality the custom resource provider should expose or…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
3
votes
1 answer

What is the proper way to Patch an object with controller-runtime?

I am trying to update an object's Env field but I don't want to have to iterate through them to figure out which fields already exist and need to be updated instead of inserted if that isn't necessary. I'm using controller-runtime. I tried patching…
Andrew DiNunzio
  • 143
  • 4
  • 17
3
votes
1 answer

kube-apiserver pod sticks in the CreateContainerError status

I bootstrap a kubernetes cluster using kubeadm. After a few month of inactivity, when I get our running pods, I realize that the kube-apiserver sticks in the CreatecontainerError! kubectl get pods -n kube-system NAME …
Majid Rajabi
  • 1,417
  • 6
  • 20
  • 35
3
votes
1 answer

Setup the feature gate RuntimeClass in kube-apiserver

I want to setup the feature gates argument in the apiserver pod. How I can do it? I have triedit it by using the solution from here: apiVersion: kubeadm.k8s.io/v1alpha1 kind: MasterConfiguration apiServerExtraArgs: feature-gates:…
Jorgese
  • 551
  • 6
  • 14
3
votes
3 answers

how to enable api flags in kubernetes

The below screenshot shows the kubernetes document to enable API server flags, but no clear instructions were given on where to change these API server flags. I'm using kubernetes on digital ocean cloud. I can not use hpa. kubernetes version is:
AATHITH RAJENDRAN
  • 4,689
  • 8
  • 34
  • 58
3
votes
1 answer

Can I get a Pod's pause container ID via the Kubernetes API?

When I list the pods in a cluster (on a specific node and in all namespaces) then each pod listed also contains the container statuses, and therein I get the container runtime engine IDs of each of the containers listed. To illustrate, I'm using…
TheDiveO
  • 2,183
  • 2
  • 19
  • 38
3
votes
3 answers

Kubernetes master is returning 401 Unauthorized error

I have installed minikube, kubectl in my laptop. When I run kubectl cluster-info in get the below Kubernetes master is running at https://10.168.99.10:8443 when I connect to https://10.168.99.10:8443 I get the below response. { "kind":…
user51
  • 8,843
  • 21
  • 79
  • 158
2
votes
1 answer

How can I tell if server-side apply is enabled in my Kubernetes cluster?

The page on server-side apply in the Kubernetes docs suggests that it can be enabled or disabled (e.g., the docs say, "If you have Server Side Apply enabled ..."). I have a GKE cluster and I would like to check if server-side apply is enabled. How…
1 2
3
13 14