Questions tagged [kubernetes-apiserver]

201 questions
1
vote
3 answers

Kubernetes python API get instances of CRD

I'm currently using the Python APIs for Kubernetes and I have to: Retrieve the instance of a custom resource name FADepl. Edit the value of that instance. In the terminal, I would simply list all FADepls with kubectl get fadepl and then edit the…
1
vote
0 answers

Clarification on using K8s API server URL in Azure

I have a Kubernetes cluster in Azure Kubernetes Service (AKS). I am writing a client program to retrieve the pods list in this cluster using the Kubernetes REST API. This client program will also be running inside the cluster in future. For the…
Arunan Sugunakumar
  • 3,311
  • 3
  • 12
  • 20
1
vote
2 answers

spec.rules[0].http.backend.servicePort: Invalid value: \"80\": must contain at least one letter or number(a-z,0-9)", Error - createNamespacedIngress()

spec.rules[0].http.backend.servicePort: Invalid value: "80": must contain at least one letter or number (a-z, 0-9)", Error while calling NetworkingV1beta1Api.createNamespacedIngress() api I am using io.kubernetes:client-java-api:12.0.1 version as a…
1
vote
2 answers

How do I create a Kubernetes Custom Resource using javascript client

My custom definition apiVersion: something.com/v1alpha1 kind: MyKind metadata: name: test spec: size: 1 image: myimage Here is an answer that shows how to create a deployment using a javascript client. However, I need to create a…
1
vote
1 answer

Kubeadm ClusterConfig specify feature gate

long story short, according to this I need to disable the RemoveSelfLink feature from the API server. I was therefore trying to do so via Kubeadm's ClusterConfiguration with something like the following: kind: ClusterConfiguration apiVersion:…
MFranc
  • 366
  • 1
  • 2
  • 14
1
vote
1 answer

Is there documentation regarding exceptions thrown by kubernetes api server, it would be good to have in java but any language will do

We have a use case to monitor kubernetes clusters and I am trying to find the list of exceptions thrown by kubernetes to reflect the status of the k8s server (in a namespace) while trying to submit a job on the UI. Example: if k8s server throws…
1
vote
2 answers

Using a custom certificate for the Kubernetes api server with minikube

I have been trying to find how to do this but so far have found nothing, I am quite new to Kubernetes so I might just have looked over it. I want to use my own certificate for the Kubernetes API server, is this possible? And if so, can someone…
1
vote
1 answer

Jenkins Kubernetes builds fail with Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=proxy)

Exec Summary Jenkins is running in a Kubernetes cluster just upgrade to 1.19.7 but now jenkins build scripts are failing when running sh "kubectl --kubeconfig ${args.config} config use-context ${args.context}" to give…
1
vote
2 answers

Add apiserver extraArgs/extraVolumes in a live cluster

I have a Kubernetes cluster 1.17, and I want to add some extraArgs and extraVolumes (like in https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/) in the apiserver. Usually, I update the manifest file…
Antoine
  • 310
  • 1
  • 5
  • 14
1
vote
1 answer

Closing client connection to kubernetes API server in python client

I am using kubernetes-client library in python and looking at the various examples, it appears we don't need to explicitly close the client connection to the API server. Does the client connection gets terminated automatically or are the examples…
1
vote
1 answer

Expose kube-apiserver with additional IP address

I setup a k8s cluster using kubeadm init on a bare metal cluster. I noticed the kube-apiserver is exposing its interface on a private IP: # kubectl get pods kube-apiserver-cluster1 -n kube-system -o wide NAME …
1
vote
1 answer

How to modify default expired time of continue token in Kubernetes?

On this page https://kubernetes.io/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks, there is a continue token that will expire after a short amount of time (by default 5 minutes). I find that when kubernetes controller…
1
vote
1 answer

Get kubelet logs using the client api

I am trying to get kubelet logs (not the pod logs, but the actual kubelet logs) from a node using kubernetes's API. So far I've failed to find a way. Of course I can access the logs directly but this solution would be OS and Operator dependent. Any…
manavellam
  • 231
  • 3
  • 9
1
vote
1 answer

Manage scaling of Statefulsets using Kubernetes API

I want scale up my statefulset and want to initiate this scale up from inside the pod(container) using the Kubernetes API(http request) to the kubernetes rest server. I tried scaling up statefulset pods using PUT…
1
vote
1 answer

Enable REST APIs for GKE deployment, service and others

I am trying to deploy applications on GKE using REST APIs. However, the GKE documentation is all mixed up and unclear as to how to enable the Kubernetes REST API access. Does anyone here have a clear idea about how to create a Deployment on…