<p>I have a Kubernetes cluster running. I used:</p>

<pre><code>kubeadm init --apiserver-advertise-address=192.168.20.101 --pod-network-cidr=10.244.0.0/16
</code></pre>

<p>This is working okay. Now I'm putting this in a script and I only want to execute kubeadm init again if my cluster is not running fine. How can I check if a Kubernetes cluster is running fine? So if not I can recreate the cluster.</p>

mealesbia
<p>You can use the following command to do that:</p>

<pre><code>[root@ip-10-0-1-19]# kubectl cluster-info
Kubernetes master is running at https://10.0.1.197:6443
KubeDNS is running at https://10.0.1.197:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
</code></pre>

<p>It shows that your master is running fine on particular url. </p>
