<p>I restarted my system today. After that my main system and the web browser are not connected to look for a kubernetes GUI.</p>
<p>When I ran the command <code>systemctl status kube-apiserver.service</code>,
it gives output as shown below:</p>
<pre><code>kube-apiserver.service
  Loaded: not-found (Reason: No such file or directory)
  Active: inactive (dead)
</code></pre>
<p>How can <code>api-server</code> be restarted?</p>

Deepak Nayak
<p><strong>Did you download and installed the <a href="https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/08-bootstrapping-kubernetes-controllers.md#download-and-install-the-kubernetes-controller-binaries" rel="noreferrer">Kubernetes Controller Binaries</a> directly?</strong></p>
<p>1 ) <strong>If so</strong>, check if the <code>kube-apiserver.service</code> systemd unit file exists:</p>
<pre><code>cat /etc/systemd/system/kube-apiserver.service
</code></pre>
<p>2 ) <strong>If not</strong>, you probably installed K8S with <a href="/questions/tagged/kubeadm" class="post-tag" title="show questions tagged &#39;kubeadm&#39;" rel="tag">kubeadm</a>. <br>
<strong>With this setup the <em>kubeapi-server</em> is running as a pod on the master node</strong>:</p>
<pre><code>kubectl get pods -n kube-system
NAME                                       READY   STATUS    
coredns-f9fd979d6-jsn6w                    1/1     Running  ..
coredns-f9fd979d6-tv5j6                    1/1     Running  ..
etcd-master-k8s                            1/1     Running  ..
kube-apiserver-master-k8s                  1/1     Running  .. #&lt;--- Here
kube-controller-manager-master-k8s         1/1     Running  ..
kube-proxy-5kzbc                           1/1     Running  ..
kube-scheduler-master-k8s                  1/1     Running  ..
</code></pre>
<p><strong>And not as a systemd service.</strong></p>
<p>So, because you can't restart pods in K8S you'll have to delete it:</p>
<pre><code>kubectl delete pod/kube-apiserver-master-k8s -n kube-system
</code></pre>
<p>And a new pod will be created immediately.</p>
<hr />
<p>(*) When you run <a href="https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/" rel="noreferrer">kubeadm init</a> you should see the creation of the manifests for the control plane <a href="https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/" rel="noreferrer">static Pods</a>:</p>
<pre><code>.
. 
[control-plane] Using manifest folder &quot;/etc/kubernetes/manifests&quot;
[control-plane] Creating static Pod manifest for &quot;kube-apiserver&quot;
[control-plane] Creating static Pod manifest for &quot;kube-controller-manager&quot;
[control-plane] Creating static Pod manifest for &quot;kube-scheduler&quot;
[etcd] Creating static Pod manifest for local etcd in &quot;/etc/kubernetes/manifests&quot;
.
.
</code></pre>
<p>The corresponding yamls:</p>
<pre><code>ubuntu@master-k8s:/etc/kubernetes/manifests$ ls -la
total 24
drwxr-xr-x 2 root root 4096 Oct 14 00:13 .
drwxr-xr-x 4 root root 4096 Sep 29 02:30 ..
-rw------- 1 root root 2099 Sep 29 02:30 etcd.yaml
-rw------- 1 root root 3863 Oct 14 00:13 kube-apiserver.yaml &lt;----- Here
-rw------- 1 root root 3496 Sep 29 02:30 kube-controller-manager.yaml
-rw------- 1 root root 1384 Sep 29 02:30 kube-scheduler.yaml
</code></pre>
<p>And the <em>kube-apiserver</em> spec:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  annotations:
    kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint: 10.100.102.5:6443
  creationTimestamp: null
  labels:
    component: kube-apiserver
    tier: control-plane
  name: kube-apiserver
  namespace: kube-system
spec:
  containers:
  - command:
    - kube-apiserver
    - --advertise-address=10.100.102.5
    - --allow-privileged=true
    - --authorization-mode=Node,RBAC
    - --client-ca-file=/etc/kubernetes/pki/ca.crt
    - --enable-admission-plugins=NodeRestriction
    - --enable-bootstrap-token-auth=true
    .
    .
    .
</code></pre>
