<p>I am trying to do <a href="https://rancher.com/docs/k3s/latest/en/installation/airgap/#install-options" rel="nofollow noreferrer">offline setup of k3s</a> i.e. without internet connectivity for <em>Single Server Configuration</em> by below steps, but at the end k3s service status is <code>loaded</code> instead of <code>active</code> and the <code>default/kube-system</code> pods not coming up.</p>
<p>I Downloaded k3s binary from <a href="https://github.com/k3s-io/k3s/releases/tag/v1.22.3+k3s1" rel="nofollow noreferrer">Assets</a> and <a href="https://get.k3s.io/" rel="nofollow noreferrer">install.sh script</a>, then:</p>
<ol>
<li><code>cp /home/my-ubuntu/k3s /usr/local/bin/</code></li>
<li><code>cd /usr/local/bin/</code></li>
<li><code>chmod 770 k3s</code> - giving executable rights to k3s binary</li>
<li>placed <a href="https://github.com/k3s-io/k3s/releases/download/v1.22.3%2Bk3s1/k3s-airgap-images-amd64.tar" rel="nofollow noreferrer">airgap-images-amd64.tar</a> image at <code>/var/lib/rancher/k3s/agent/images/</code></li>
<li><code>mkdir /etc/rancher/k3s</code></li>
<li><code>cp /home/my-ubuntu/k3s.yaml /etc/rancher/k3s</code> - copying k3s config file from different machine (because when I tried without config file, I cant set export variable (Step 7) &amp; can't get to see default pods by <code>kubectl get all -A</code>). I think I am mistaken at this step, please confirm.</li>
<li><code>chmod 770 /etc/rancher/k3s/k3s.yaml</code></li>
<li><code>export KUBECONFIG=/etc/rancher/k3s/k3s.yaml</code> - setting KUBECONFIG env. variable</li>
<li><code>INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh</code></li>
</ol>
<p>Error in <code>journalctl -xe</code>:</p>
<pre class="lang-text prettyprint-override"><code>    -- Unit k3s.service has begun starting up.
    Nov 09 19:11:51 my-ubuntu sh[14683]: + /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service
    Nov 09 19:11:51 my-ubuntu sh[14683]: /bin/sh: 1: /usr/bin/systemctl: not found
    Nov 09 19:11:51 my-ubuntu k3s[14695]: time=&quot;2021-11-09T19:11:51.488895919+05:30&quot; level=fatal msg=&quot;no default routes found in \&quot;/proc/net/route\&quot; or \&quot;/proc/net/ipv6_route\&quot;&quot;
    Nov 09 19:11:51 my-ubuntu systemd[1]: k3s.service: Main process exited, code=exited, status=1/FAILURE
    Nov 09 19:11:51 my-ubuntu systemd[1]: k3s.service: Failed with result 'exit-code'.
    Nov 09 19:11:51 my-ubuntu systemd[1]: Failed to start Lightweight Kubernetes.
    -- Subject: Unit k3s.service has failed
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    -- Unit k3s.service has failed.
-- The result is RESULT.
Nov 09 19:11:56 shreya-Virtual-Machine systemd[1]: k3s.service: Service hold-off time over, scheduling restart.
Nov 09 19:11:56 shreya-Virtual-Machine systemd[1]: k3s.service: Scheduled restart job, restart counter is at 20.
-- Subject: Automatic restarting of a unit has been scheduled
</code></pre>
<p><strong>PS:</strong> At this stage, the moment I connect this machine to internet, below default pods started coming for command <code>kubectl get all -A</code>:</p>
<pre class="lang-text prettyprint-override"><code>NAMESPACE     NAME                                      READY
kube-system   metrics-server-86cbb8457f-rthkn           1/1
kube-system   helm-install-traefik-crd-w6wgf            1/1
kube-system   helm-install-traefik-m7lkg                1/1
kube-system   svclb-traefik-x6qbc                       2/2
kube-system   traefik-97b44b794-98nkl                   1/1
kube-system   local-path-provisioner-5ff76fc89d-l8825   1/1
kube-system   coredns-7448499f4d-br6tm                  1/1
</code></pre>
<p><strong>My aim is simply install k3s without internet connectivity (offline) &amp; get all these pods up running.</strong> Please let me what am I missing here?</p>

<p>There is an <a href="https://github.com/k3s-io/k3s/issues/1103" rel="nofollow noreferrer">open issue</a> for offline installation- default gateway need to be set.</p>
<p>follow <a href="https://github.com/k3s-io/k3s/issues/1144#issuecomment-559316077" rel="nofollow noreferrer">this comment</a>, it should work.</p>
<blockquote>
<p>[aiops@7 ~]$ ip route<br/>
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1<br/>
192.168.100.0/24 dev ens192 proto kernel scope link src 192.168.100.7 metric 100<br/>
sudo ip route add default via 192.168.100.1</p>
</blockquote>
