Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is kube-apiserver located

Base question: When I try to use kube-apiserver on my master node, I get command not found error. How I can install/configure kube-apiserver? Any link to example will help.

$ kube-apiserver --enable-admission-plugins DefaultStorageClass -bash: kube-apiserver: command not found 

Details: I am new to Kubernetes and Docker and was trying to create StatefulSet with volumeClaimTemplates. My problem is that the automatic PVs are not created and I get this message in the PVC log: "persistentvolume-controller waiting for a volume to be created". I am not sure if I need to define DefaultStorageClass and so needed kube-apiserver to define it.

Name:          nfs Namespace:     default StorageClass:  example-nfs Status:        Pending Volume: Labels:        <none> Annotations:   volume.beta.kubernetes.io/storage-provisioner=example.com/nfs Finalizers:    [kubernetes.io/pvc-protection] Capacity: Access Modes: Events:   Type    Reason                Age                  From                         Message   ----    ------                ----                 ----                         -------   Normal  ExternalProvisioning  3m (x2401 over 10h)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner "example.com/nfs" or manually created by system administrator 

Here is get pvc result:

$ kubectl get pvc NAME      STATUS    VOLUME    CAPACITY   ACCESS MODES   STORAGECLASS   AGE nfs       Pending                                       example-nfs    10h 

And get storageclass:

$ kubectl describe storageclass example-nfs Name:                  example-nfs IsDefaultClass:        No Annotations:           <none> Provisioner:           example.com/nfs Parameters:            <none> AllowVolumeExpansion:  <unset> MountOptions:          <none> ReclaimPolicy:         Delete VolumeBindingMode:     Immediate Events:                <none> 

How can I troubleshoot this issue (e.g. logs for why the storage was not created)?

like image 501
raj_arni Avatar asked May 15 '18 14:05

raj_arni


People also ask

Where is kube-Apiserver service?

Usually the apiserver is deployed as a static pod. In this case you should see it listed when you run kubectl get po -n kube-system .

What is kube-Apiserver?

The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the cluster's shared state through which all other components interact.

How do I check my kube-Apiserver settings?

You might be able to propagate the desired enable-admission-plugins through kube-apiserver command inside this Pod, however any modification will disappear once api-server Pod re-spawns, i.e. master node reboot, etc. The essential api-server config located in /etc/kubernetes/manifests/kube-apiserver.

Where is kube proxy running?

kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept. kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster.


1 Answers

You are asking two different questions here, one about kube-apiserver configuration, one about troubleshooting your StorageClass.

Here's an answer for your first question:

kube-apiserver is running as a Docker container on your master node. Therefore, the binary is within the container, not on your host system. It is started by the master's kubelet from a file located at /etc/kubernetes/manifests. kubelet is watching this directory and will start any Pod defined here as "static pods".

To configure kube-apiserver command line arguments you need to modify /etc/kubernetes/manifests/kube-apiserver.yaml on your master.

like image 154
embik Avatar answered Sep 16 '22 16:09

embik