Author: iwilltry42 <iwilltry42@gmail.com>
Date:   Tue Oct 6 12:46:06 2020 +0200

    docs: add some missing flags and info on host.k3d.internal
pull/667/head
iwilltry42 4 years ago
parent 19c3a03d13
commit c52fe7baf7
  1. 47
      faq/faq/index.html
  2. 2
      search/search_index.json
  3. BIN
      sitemap.xml.gz
  4. 5
      usage/commands/index.html

@ -452,6 +452,13 @@
Passing additional arguments/flags to k3s (and on to e.g. the kube-apiserver)
</a>
</li>
<li class="md-nav__item">
<a href="#how-to-access-services-like-a-database-running-on-my-docker-host-machine" class="md-nav__link">
How to access services (like a database) running on my Docker Host Machine
</a>
</li>
</ul>
@ -534,6 +541,13 @@
Passing additional arguments/flags to k3s (and on to e.g. the kube-apiserver)
</a>
</li>
<li class="md-nav__item">
<a href="#how-to-access-services-like-a-database-running-on-my-docker-host-machine" class="md-nav__link">
How to access services (like a database) running on my Docker Host Machine
</a>
</li>
</ul>
@ -561,19 +575,18 @@
</ul>
<h2 id="issues-with-zfs">Issues with ZFS<a class="headerlink" href="#issues-with-zfs" title="Permanent link">&para;</a></h2>
<ul>
<li>
<p>k3s currently has <a href="ttps://github.com/rancher/k3s/issues/66">no support for ZFS</a> and thus, creating multi-server setups (e.g. <code>k3d cluster create multiserver --servers 3</code>) fails, because the initializing server node (server flag <code>--cluster-init</code>) errors out with the following log:
<div class="highlight"><pre><span></span><code>starting kubernetes: preparing server: start cluster and https: raft_init<span class="o">()</span>: io: create I/O capabilities probe file: posix_allocate: operation not supported on socket
</code></pre></div></p>
</li>
<li>
<p>This issue can be worked around by providing docker with a different filesystem (that&rsquo;s also better for docker-in-docker stuff).</p>
</li>
<li>k3s currently has <a href="ttps://github.com/rancher/k3s/issues/66">no support for ZFS</a> and thus, creating multi-server setups (e.g. <code>k3d cluster create multiserver --servers 3</code>) fails, because the initializing server node (server flag <code>--cluster-init</code>) errors out with the following log:</li>
</ul>
<div class="highlight"><pre><span></span><code>starting kubernetes: preparing server: start cluster and https: raft_init<span class="o">()</span>: io: create I/O capabilities probe file: posix_allocate: operation not supported on socket
</code></pre></div>
<ul>
<li>This issue can be worked around by providing docker with a different filesystem (that&rsquo;s also better for docker-in-docker stuff).</li>
<li>A possible solution can be found here: <a href="https://github.com/rancher/k3s/issues/1688#issuecomment-619570374">https://github.com/rancher/k3s/issues/1688#issuecomment-619570374</a></li>
</ul>
<h2 id="pods-evicted-due-to-lack-of-disk-space">Pods evicted due to lack of disk space<a class="headerlink" href="#pods-evicted-due-to-lack-of-disk-space" title="Permanent link">&para;</a></h2>
<ul>
<li>Pods go to evicted state after doing X<ul>
<li>Pods go to evicted state after doing X</li>
<li>Related issues: <a href="https://github.com/rancher/k3d/issues/133">#133 - Pods evicted due to <code>NodeHasDiskPressure</code></a> (collection of #119 and #130)</li>
<li>Background: somehow docker runs out of space for the k3d node containers, which triggers a hard eviction in the kubelet</li>
<li>Possible <a href="https://github.com/rancher/k3d/issues/133#issuecomment-549065666">fix/workaround by @zer0def</a>:<ul>
@ -583,8 +596,6 @@
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="restarting-a-multi-server-cluster-or-the-initializing-server-node-fails">Restarting a multi-server cluster or the initializing server node fails<a class="headerlink" href="#restarting-a-multi-server-cluster-or-the-initializing-server-node-fails" title="Permanent link">&para;</a></h2>
<ul>
<li>What you do: You create a cluster with more than one server node and later, you either stop <code>server-0</code> or stop/start the whole cluster</li>
@ -597,22 +608,22 @@
<ul>
<li>The Problem: Passing a feature flag to the Kubernetes API Server running inside k3s.</li>
<li>Example: you want to enable the EphemeralContainers feature flag in Kubernetes</li>
<li>Solution: <code class="highlight">k3d cluster create --k3s-server-arg <span class="s1">&#39;--kube-apiserver-arg=feature-gates=EphemeralContainers=true&#39;</span></code></li>
<li>
<p>Solution: <code class="highlight">k3d cluster create --k3s-server-arg <span class="s1">&#39;--kube-apiserver-arg=feature-gates=EphemeralContainers=true&#39;</span></code></p>
<p>Note: Be aware of where the flags require dashes (<code>--</code>) and where not.</p>
<ul>
<li>Note: Be aware of where the flags require dashes (<code>--</code>) and where not.<ul>
<li>the k3s flag (<code>--kube-apiserver-arg</code>) has the dashes</li>
<li>the kube-apiserver flag <code>feature-gates</code> doesn&rsquo;t have them (k3s adds them internally)</li>
</ul>
</li>
</ul>
</li>
<li>
<p>Second example: <code class="highlight">k3d cluster create k3d-one --k3s-server-arg --cluster-cidr<span class="o">=</span><span class="s2">&quot;10.118.0.0/17&quot;</span> --k3s-server-arg --service-cidr<span class="o">=</span><span class="s2">&quot;10.118.128.0/17&quot;</span> --k3s-server-arg --disable<span class="o">=</span>servicelb --k3s-server-arg --disable<span class="o">=</span>traefik --verbose</code></p>
<ul>
</li>
<li>Note: There are many ways to use the <code>"</code> and <code>'</code> quotes, just be aware, that sometimes shells also try to interpret/interpolate parts of the commands</li>
</ul>
</li>
<h2 id="how-to-access-services-like-a-database-running-on-my-docker-host-machine">How to access services (like a database) running on my Docker Host Machine<a class="headerlink" href="#how-to-access-services-like-a-database-running-on-my-docker-host-machine" title="Permanent link">&para;</a></h2>
<ul>
<li>As of version v3.1.0, we&rsquo;re injecting the <code>host.k3d.internal</code> entry into the k3d containers (k3s nodes) and into the CoreDNS ConfigMap, enabling you to access your host system by referring to it as <code>host.k3d.internal</code></li>
</ul>
@ -622,7 +633,7 @@
<div class="md-source-date">
<small>
Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 13, 2020</span>
Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">October 6, 2020</span>
</small>
</div>

File diff suppressed because one or more lines are too long

Binary file not shown.

@ -469,7 +469,10 @@
--k3s-server-arg <span class="c1"># add additional arguments to the k3s server (see https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#k3s-server-cli-help)</span>
-s, --servers <span class="c1"># specify how many server nodes you want to create</span>
--network <span class="c1"># specify a network you want to connect to</span>
--no-hostip <span class="c1"># disable the automatic injection of the Host IP as &#39;host.k3d.internal&#39; into the containers and CoreDN</span>
--no-image-volume <span class="c1"># disable the creation of a volume for storing images (used for the &#39;k3d load image&#39; command)</span>
--no-lb <span class="c1"># disable the creation of a LoadBalancer in front of the server nodes</span>
--no-rollback <span class="c1"># disable the automatic rollback actions, if anything goes wrong</span>
-p, --port <span class="c1"># add some more port mappings</span>
--token <span class="c1"># specify a cluster token (default: auto-generated)</span>
--timeout <span class="c1"># specify a timeout, after which the cluster creation will be interrupted and changes rolled back</span>
@ -526,7 +529,7 @@
<div class="md-source-date">
<small>
Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 5, 2020</span>
Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">October 6, 2020</span>
</small>
</div>

Loading…
Cancel
Save