<p>i installed K8S cluster in my laptop, it was running fine in the beginning but when i restarted my laptop then some services were not running.</p>

<pre><code>kube-system   coredns-5c98db65d4-9nm6m             0/1     Error                  594        12d
kube-system   coredns-5c98db65d4-qwkk9             0/1     CreateContainerError


kube-system   kube-scheduler-kubemaster            0/1     CreateContainerError  
</code></pre>

<p>I searched online for solution but could not get appropriate answer ,
please help me resolve this issue</p>

<p>I encourage you to look for <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/" rel="nofollow noreferrer">official kubernetes documentation</a>. Remember that your kubemaster should have at least fallowing resources: 2CPUs or more, 2GB or more of RAM.</p>

<ol>
<li><p>Firstly install <a href="https://docs.docker.com/install/linux/docker-ce/ubuntu/" rel="nofollow noreferrer">docker</a> and <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" rel="nofollow noreferrer">kubeadm</a> (as a root user) on each machine.</p></li>
<li><p>Initialize kubeadm (on master):</p></li>
</ol>

<pre><code>kubeadm init &lt;args&gt;
</code></pre>

<p>For example for Calico to work correctly, you need to pass <code>--pod-network-cidr=192.168.0.0/16</code> to kubeadm init:</p>

<pre><code>kubeadm init --pod-network-cidr=192.168.0.0/16
</code></pre>

<ol start="3">
<li>Install a <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network" rel="nofollow noreferrer">pod network</a> add-on (depends on what you would like to use). You can install a pod network add-on with the following command:</li>
</ol>

<pre><code>kubectl apply -f &lt;add-on.yaml&gt;
</code></pre>

<p>e.g. for Calico:</p>

<pre><code>kubectl apply -f https://docs.projectcalico.org/v3.8/manifests/calico.yaml
</code></pre>

<ol start="4">
<li>To start using your cluster, you need to run on master the following as a regular user:</li>
</ol>

<pre><code>mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
</code></pre>

<ol start="5">
<li>You can now join any number of machines by running the following on each node as root:</li>
</ol>

<pre><code>kubeadm join &lt;master-ip&gt;:&lt;master-port&gt; --token &lt;token&gt; --discovery-token-ca-cert-hash sha256:&lt;hash&gt;
</code></pre>

<p>By default, <strong>tokens expire after 24 hours</strong>. If you are joining a node to the cluster after the current token has expired, you can create a new token by running the following command on the control-plane node:</p>

<pre><code>kubeadm token create
</code></pre>

<p>Please, let me know if it works for you.</p>
