<p>I am currently using command <code>curl -sfL https://get.k3s.io</code> to download k3s. The script <strong><a href="https://get.k3s.io/" rel="nofollow noreferrer">get.k3s.io</a></strong> is using third party internet calls to URLs:</p>
<pre><code>GITHUB_URL=https://github.com/k3s-io/k3s/releases
STORAGE_URL=https://storage.googleapis.com/k3s-ci-builds
</code></pre>
<p>I want to avoid the above calls to URLs and want same k3s package to be stored locally in my personal github project location and download/read it from there. Can some one let me know the steps/procedure to edit this script or download and store k3s locally?</p>

<p>K3s GitHub page has instructions for <a href="https://github.com/k3s-io/k3s#manual-download" rel="nofollow noreferrer">Manual Download</a>. You just download the appropriate version from <a href="https://github.com/k3s-io/k3s/releases" rel="nofollow noreferrer">releases</a>, and use it like any other binary.</p>
<p>Downloaded binary is not executable by default. You have to make it so, before using it</p>
<pre class="lang-text prettyprint-override"><code>chmod +x k3s
</code></pre>
<p>If you want <code>k3s</code> to be available system-wide, you need to put it in correct location (e.g. <code>/usr/local/bin</code>)</p>
<pre class="lang-text prettyprint-override"><code>sudo mv k3s /usr/local/bin
</code></pre>
<p>If you skip the above step, replace <code>k3s</code> with <code>./k3s</code> in the steps below.</p>
<pre class="lang-text prettyprint-override"><code>sudo k3s server &amp;
# Kubeconfig is written to /etc/rancher/k3s/k3s.yaml
sudo k3s kubectl get nodes

# On a different node run the below. NODE_TOKEN comes from
# /var/lib/rancher/k3s/server/node-token on your server
sudo k3s agent --server https://myserver:6443 --token ${NODE_TOKEN}
</code></pre>
<p><sup>[<a href="https://github.com/k3s-io/k3s#manual-download" rel="nofollow noreferrer">source</a>]</sup></p>
<p>Alternatively you can <a href="https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository" rel="nofollow noreferrer">clone the repository</a>, and replace the URLs in the script with your repo. I'm not sure, however, how well it would work.</p>
<p><code>STORAGE_URL</code> variable is used to download specific commit version. For it to work <code>INSTALL_K3S_COMMIT</code> environment variable must be set prior. You should not be concerned by it, unless you are a developer or a QA.</p>
