<p>When I try to check my k8s certs expiration states, I run the following command:</p>

<pre class="lang-sh prettyprint-override"><code>kubeadm alpha certs check-expiration
</code></pre>

<p>which ended up with:</p>

<pre><code>name: Invalid value: "alpha_53_116": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
</code></pre>

<p>I was wondering why it needs to check the node's hostname? As the hostname of my master node couldn't be altered, is there any way to solve this problem?</p>

<hr>

<p>complement:</p>

<p>OS: Centos 7.4<br>
kubeadm version: 1.15.0</p>

George Liang
<p>As you pointed in your question, problem is with your node name.
According to <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#check-certificate-expiration" rel="nofollow noreferrer">documentation</a> command <code>kubeadm alpha certs</code></p>

<blockquote>
  <p>The command shows expiration/residual time for the client certificates
  in the /etc/kubernetes/pki folder and for the client certificate
  embedded in the KUBECONFIG files used by kubeadm (admin.conf,
  controller-manager.conf and scheduler.conf).</p>
</blockquote>

<p>Mentioned files can be found in <code>/etc/kubernetes</code>. You can also check kubeadm init configuration using <code>kubeadm config print init-defaults</code>. </p>

<p>Those files will contain name of your hostname which is invalid in kubeadm/kubernetes. 
In short, as <code>kubeadm alpha certs</code> is based on KUBECONFIG files and pki folder, it will not go trought validation due to "_" sign. 
Unfortunately it is syntax issue so there is no workaround.</p>

<p>Please keep in mind that <code>alpha</code> is Kubeadm experimental sub-commands. So it might be changed in the future.</p>
