<p dir="auto">Had started on a page that references this page. Have filed an issue against the parent but part of its resolution involves fixing this page too:</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135128955" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/21631" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/21631/hovercard" href="https://github.com/kubernetes/kubernetes/issues/21631">#21631</a></p>
<p dir="auto">The page:</p>
<p dir="auto"><a href="http://kubernetes.io/v1.1/examples/https-nginx/README.html" rel="nofollow">http://kubernetes.io/v1.1/examples/https-nginx/README.html</a></p>
<p dir="auto"><a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/examples/https-nginx/README.md">https://github.com/kubernetes/kubernetes/blob/release-1.1/examples/https-nginx/README.md</a></p>
<p dir="auto">Provides instructions on generating a secret. It was not immediately obvious from this page (I linked directly to it to a 1. Download/build the code, 2. You should have a "make" command....) that there's an assumption that the reader will have downloaded Kubernetes/examples sources. The make command obviously won't work as the correct "make" command won't exist:</p>
<p dir="auto">make keys secret KEY=/tmp/nginx.key CERT=/tmp/nginx.crt SECRET=/tmp/secret.json</p>
<p dir="auto">After attempting and failing to download/build the sources, I believe that this script no longer works:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="108337767" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/14558" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/14558/hovercard" href="https://github.com/kubernetes/kubernetes/issues/14558">#14558</a></p>
<p dir="auto">Ironically, I found generate-secrets-from-file on the following page and, through grokking this and the make_secret.go file, I was able to muddle through and create a secret.json file for Kubernetes.</p>
<p dir="auto"><a href="https://tectonic.com/enterprise/docs/latest/deployer/tls.html" rel="nofollow">https://tectonic.com/enterprise/docs/latest/deployer/tls.html</a></p>
<p dir="auto">Recommend:</p>
<p dir="auto">Add documentation that explicitly documents (separately) how to generate a Kuberenetes secret from self-signed certificates.</p>
<p dir="auto">Please add (if there's not already) an easier way to submit bugs against kubernetes.io by helping the reader reference the github source directly. I googled for duplicates to find the correct github page.</p>
<p dir="auto">Forked from the discussion in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="169417586" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/30083" data-hovercard-type="pull_request" data-hovercard-url="/kubernetes/kubernetes/pull/30083/hovercard" href="https://github.com/kubernetes/kubernetes/pull/30083">#30083</a> for implementing against CRI. I remember there is an old issue for this, but couldn't find it anyway.</p>
<p dir="auto">It's worth noted that changing the container naming format is likely to cause one-time backward compatibility issues during upgrades, and may need non-trivial effort to ensure nothing would break. We'll need to determine whether it's worth the efforts to overhaul the naming logic right now. However, it shouldn't be a blocker for the ongoing kuberuntime implementation. We can use this issue to discuss what naming format to use and whether we want to make the change and/or make it backward compatible.</p>
<p dir="auto">Kubelet embeds a lot of information in the (docker) container name itself so that it can retrieve the information easily. The current format:<br>
<code class="notranslate">k8s_&lt;container_name&gt;.&lt;hash_of_container&gt;_&lt;pod_name&gt;_&lt;pod_namespace&gt;_&lt;pod_UID&gt;_&lt;random_ID&gt;</code></p>
<ul dir="auto">
<li>kubelet detects whether a container meets the desired spec by checking the hash of the container.</li>
<li>As for the random ID, it's used to ensure each name is unique since kubelet creates a new instance of the container every time a container terminates (i.e., restarting).</li>
<li>The "k8s_" prefix is used to detect whether this container is managed by kubelet or not.</li>
</ul>
<p dir="auto">E.g.,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pod name: heapster-v1.1.0-527143062-67der
pod namespace: kube-system
container name: heapster-nanny

The docker container name:
k8s_heapster-nanny.1a2e29e8_heapster-v1.1.0-527143062-67der_kube-system_b288c37f-58d9-11e6-a5b5-42010af00002_d4cdbac9"><pre class="notranslate"><code class="notranslate">pod name: heapster-v1.1.0-527143062-67der
pod namespace: kube-system
container name: heapster-nanny

The docker container name:
k8s_heapster-nanny.1a2e29e8_heapster-v1.1.0-527143062-67der_kube-system_b288c37f-58d9-11e6-a5b5-42010af00002_d4cdbac9
</code></pre></div>
<p dir="auto">With CRI, there is no need to construct a super long container name. We could either rely more on the labels, or potentially rely on the runtime to provide more information.<br>
However, we still need to 1) make container name meaningful and user-friendly, and 2) generate unique name</p>
<p dir="auto">IMO, we can write the <code class="notranslate">&lt;hash_of_container&gt;</code> as a label and remove it from the name. The pod UID, though useful in some cases (when pods get recreated), is too long and should be omitted. The new name will look like:<br>
<code class="notranslate">k8s_&lt;container_name&gt;_&lt;pod_name&gt;_&lt;pod_namespace&gt;_&lt;random_ID&gt;</code></p>
<p dir="auto">@kubernetes/sig-node <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thockin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thockin">@thockin</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dchen1107/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dchen1107">@dchen1107</a></p>