Questions tagged [kubernetes-apiserver]
201 questions
6
votes
1 answer
How Do I Properly Set --kubelet-certificate-authority apiserver parameter?
I am using KubeSpray to provision a two node cluster on AWS. By default, the --kubelet-certificate-authority parameter is not used. However, I would like to set it.
I do not know the correct setting for --kubelet-certificate-authority. When I set it…

David Medinets
- 5,160
- 3
- 29
- 42
6
votes
2 answers
403 Forbidden error when trying to access Kubernetes API from a pod
As per this Documentation, I am trying to access the Kuberenetes API from a pod, using the following command
curl --cacert ca.crt -H "Authorization: Bearer $(

anushiya-thevapalan
- 561
- 3
- 5
- 16
6
votes
2 answers
How to create Pod from REST API
How can I create a Pod using REST API ?
I checked the Kubernetes API documentation:
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#-strong-write-operations-strong--54
They are writing that need to use POST request:
POST…

E235
- 11,560
- 24
- 91
- 141
5
votes
2 answers
How does Kubernetes handle multiple API versions for the same resource?
In Kubernetes we can request resources using different API versions:
kubectl get roles.v1.rbac.authorization.k8s.io foo -n bar -oyaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: foo
namespace: bar
rules:
- apiGroups:
-…

MichaelAttard
- 1,898
- 2
- 17
- 26
5
votes
3 answers
How to create a "CertificateSigningRequest" with apiVersion "certificates.k8s.io/v1" for a webhook
I have a wehook running in my cluster.
I created a certificate and signed it successfully.
certificate configuration:
cat > csr.conf <

David Wer
- 368
- 3
- 12
5
votes
1 answer
How to use the Pod conditions array returned from the client-go API?
I'm using the client-go API in Go to access the list of Pods under a given controller (Deployment). While querying the list of pods belonging to it using the selector labels, you get an array of PodConditions -…

Inian
- 80,270
- 14
- 142
- 161
5
votes
3 answers
How to access kubernetes CRD using client-go?
I have few CRDs, but I am not exactly sure how to query kube-apiserver to get list of CRs. Can anyone please provide any sample code?

Bharath Thiruveedula
- 391
- 1
- 4
- 14
4
votes
1 answer
Access Kubernetes API from a pod in C#
I'm looking for a lightweight way to access the Kubernetes API from a Pod in a C# app.
Kubernetes docs mention two ways of accessing the API from a Pod:
Run kubectl proxy in a sidecar container in the pod, or as a background process within the…

Max
- 9,220
- 10
- 51
- 83
4
votes
1 answer
Can OPA Gatekeeper be used to audit K8s PodDisruptionBudget status fields?
We are looking to use OPA gatekeeper to audit K8s PodDisruptionBudget (PDB) objects. In particular, we are looking to audit the number of disruptionsAllowed within the status field.
I believe this field will not be available at point of admission…

Howard Jones
- 49
- 2
4
votes
2 answers
K8s: gets HTTP 415 for PATCH request to Kubernetes REST API server
I have seen that PATCH request is supported in Kubernetes REST API reference manual from this link: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#patch-ingress-v1beta1-networking-k8s-io
HTTP Request
PATCH…

thenextgeneration
- 65
- 12
4
votes
1 answer
Kubernetes CRDs - Reference existing validation spec
Is there a way to access existing validation specs? For example, I want to be able to set NodeAffinity on my CRD, and would like to just $ref: . I found the entire API here:…

user2896438
- 795
- 13
- 21
4
votes
1 answer
LDAP based user authentication for Kubernetes
There are some methods natively supported such as basic auth , X509 certificates and webhook tokens.
Is there some workaround/project to use LDAP for user authentication with Kubernetes. I need users to be grouped in LDAP , and then use role binding…

Ijaz Ahmad
- 11,198
- 9
- 53
- 73
4
votes
1 answer
argo workflow-controller can't connect to Kubernetes APIServer
I have installed argo in my own namespace in a central kubernetes cluster in my organization.
After installation when argo "workflow-controller" tries to fetch the configmaps using the API server, I get timeout error.
time="2018-08-15T01:24:40Z"…

Ashu
- 367
- 5
- 14
4
votes
1 answer
Pod presets not working on minikube
I'm trying to test out pod presets on minikube. I run the following command to start minikube:
minikube start --vm-driver hyperv --hyperv-virtual-switch switch name…

R Wood
- 167
- 1
- 7
4
votes
2 answers
kubernetes: api-server and controller-manager cant start
I have a running k8s-cluster, setup with kubeadm.
I have the problem, that the api-server and controller-manager pod cant start, due to a bind-exception:
failed to create listener: failed to listen on 0.0.0.0:6443: listen tcp 0.0.0.0:6443: bind:…

lunatikz
- 716
- 1
- 11
- 27