Last active
February 20, 2019 18:28
-
-
Save ryanj/db893578283dfe0d5f92181222f37afe to your computer and use it in GitHub Desktop.
Run Kubernetes locally with Minishift! http://bit.ly/k8s-minishift-setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section data-transition='concave'> | |
<section id='local-kubernetes-environments-with-minishift'> | |
<p><img style='border:none;background:none;width:' src="http://hexb.in/vector/openshift.svg" /></p> | |
<h2>Local Kubernetes Environments</h2> | |
<h3>with <a href="https://github.com/minishift/minishift"><code>minishift</code></a></h3> | |
<br/> | |
<h4 class='fragment grow'><a href="http://bit.ly/k8s-minishift-setup"><code>bit.ly/k8s-minishift-setup</code></a></h4> | |
</section> | |
<section data-background-transition='fade' data-background='black' id='presented-by-ryanj'> | |
<p>presented by <a href="http://twitter.com/ryanj/">@ryanj</a>, Developer Advocate at <a href='http://redhat.com' style='color:red;'>Red Hat</a></p> | |
<p><a href="http://twitter.com/ryanj/"><img alt="ryanj" src="http://ryanjarvinen.com/images/ryanj-mestrefungo-com.gif" style="width:50%" /></p> | |
</section> | |
</section> | |
<section data-transition='concave' id='overview' data-markdown> | |
### Local Access to Kubernetes, with | |
# MiniShift | |
To run MiniShift on your laptop, you'll need to install: | |
1. [oc](#/oc) <!-- 2. [docker](#/docker) (optional) --> | |
2. [minishift](#/minishift) | |
</section> | |
<section id='oc'> | |
<h3>Install oc</h3> | |
<p>For detailed installation notes, see the <a href="https://docs.openshift.org/latest/cli_reference/get_started_cli.html"><code>oc</code> installation doc</a></p> | |
<p>One line install for linux/amd64:</p> | |
<pre><code contenteditable>curl -Lo oc.tar.gz https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && tar xvzf oc.tar.gz */oc && sudo mv $_ /usr/local/bin/ && rm -d openshift-origin-client-tools-* && rm oc.tar.gz</code></pre> | |
<p>One line install for macOS:</p> | |
<pre><code contenteditable>curl -Lo oc.zip https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-mac.zip && tar xvzf oc.zip oc && sudo mv oc /usr/local/bin/ && rm oc.zip</code></pre> | |
<br/> | |
<p>To verify <code>oc</code> availability, try running:</p> | |
<pre><code contenteditable>oc help</code></pre> | |
</section> | |
<section id='bash'> | |
<h3>Bash for Windows</h3> | |
<p>Windows users should install the <code>Windows Subsystem for Linux</code> and related command-line tools:</p> | |
<p>Enable <b>Control Panel > Programs > Windows Features > Windows Subsystem for Linux</b></p> | |
</section> | |
<section id='minishift'> | |
<h3>Install <code>minishift</code></h3> | |
<p>For detailed installation notes, see the <a href="https://github.com/minishift/minishift/releases"><code>minishift</code> release notes</a></i></p> | |
<p>One line install for linux/amd64:</p> | |
<pre><code contenteditable>curl -Lo minishift.tgz https://github.com/minishift/minishift/releases/download/v1.25.0/minishift-1.25.0-linux-amd64.tgz && tar xvzf minishift.tgz */minishift && sudo mv $_ /usr/local/bin/ && rm -d minishift-* && rm minishift.tgz</code></pre> | |
<p>One line install for macOS:</p> | |
<pre><code contenteditable>curl -Lo minishift.tgz https://github.com/minishift/minishift/releases/download/v1.25.0/minishift-1.25.0-darwin-amd64.tgz && tar xvzf minishift.tgz */minishift && sudo mv $_ /usr/local/bin/ && rm -d minishift-* && rm minishift.tgz</code></pre> | |
<p>Optionally, customize your cluster's memory or cpu allocation:</p> | |
<pre><code contenteditable>minishift config set memory 4096 | |
minishift config set cpus 2 | |
minishift config set openshift-version latest</code></pre> | |
<p>to verify <code>minishift</code> availability:</p> | |
<pre><code contenteditable>minishift version</code></pre> | |
</section> | |
<section id='minishift-virt'> | |
<h4>Virtualization Plugins</h4> | |
<p>See the <a href="https://docs.openshift.org/latest/minishift/getting-started/installing.html#install-prerequisites"><code>minishift</code> installation guide</a> for <a href="https://docs.openshift.org/latest/minishift/getting-started/setting-up-driver-plugin.html">virt driver plugin requirements</a></p> | |
<br/> | |
<p>If your minishift environment does not boot correctly:</p> | |
<ol> | |
<li>Minishift <a href="https://docs.openshift.org/latest/minishift/getting-started/installing.html#install-prerequisites">requires an OS virtualization solution</a>. Most OSes already include one!</li> | |
<li><a href="https://docs.openshift.org/latest/minishift/getting-started/setting-up-driver-plugin.html">Install the appropriate driver plugin</a> for your system</li> | |
<li>Use the <a href="https://docs.openshift.org/latest/minishift/getting-started/setting-up-driver-plugin.html"><code>--vm-driver</code></a> flag to select specific plugins by name</li> | |
</ol> | |
<pre><code contenteditable>minishift start --vm-driver=virtualbox</code></pre> | |
</section> | |
<section id='minishift-basics' markdown> | |
<h2>Minishift Basics</h2> | |
<p><code>minishift</code> provides an easy way to run OpenShift locally:</p> | |
<pre><code contenteditable>minishift start</code></pre> | |
<p>When you are done, halt the VM to free up system resources:</p> | |
<pre><code contenteditable>minishift stop</code></pre> | |
<p>Need a fresh start? Delete your VM instance with:</p> | |
<pre><code contenteditable>minishift delete</code></pre> | |
</section> | |
<!-- | |
<section id='docker'> | |
<h3>Install docker (optional)</h3> | |
<p>Use your package manager, or download a release from <a href="https://store.docker.com/search?offering=community&type=edition">Docker</a></p> | |
<pre><code contenteditable>brew cask install docker | |
dnf install docker | |
apt-get install docker</code></pre> | |
<br/> | |
<p>To verify <code>docker</code> command-line availability, run:</p> | |
<pre><code contenteditable>docker version</code></pre> | |
</section> | |
--> | |
<section data-transition='zoom-in convex-out' id='ready'> | |
<h1><i>Ready?</i></h1> | |
<br/> | |
<div class='fragment fade-up'> | |
<p>Verify that your local OpenShift environment is ready by running:<br/> | |
<pre><code contenteditable>oc version</code></pre> | |
<p>The output should include your <code>oc</code> version info, and the release version of the kubernetes API server (when available)</p> | |
</div> | |
</section> | |
<section data-transition='concave' id='next-steps'> | |
<h3>Congratulations on completing:</h3> | |
<p> | |
<a href="http://bit.ly/k8s-minishift"> | |
<b>Local installation of Kubernetes using <code>minishift</code>!</b> | |
<h5 class='fragment grow'><code>bit.ly/k8s-minishift-setup</code></h5> | |
</a> | |
</p> | |
<br/> | |
<h4><i>Next Steps</i></h4> | |
<p>Try the <a href="http://learn.openshift.com">OpenShift learning portal</a> at:</p> | |
<p><a href="http://learn.openshift.com">learn.openshift.com</a></p> | |
<p>Or, continue learning with other <a href="http://bit.ly/k8s-workshops"><code>k8s-workshops</code></a>:</p> | |
<ol> | |
<!--<li><a href="http://bit.ly/realtime-odo"><b>Realtime Front-End Web Development with odo</b><br/>bit.ly/realtime-odo</a></li> --> | |
<li><a href="http://bit.ly/k8s-minishift"><b>Kubernetes Command-Line Basics with <code>minishift</code></b><br/>bit.ly/k8s-minishift</a></li> | |
<!-- <li><a href="http://bit.ly/operatorpattern"><b>Extending Kubernetes with the Operator Pattern</b><br/><span style='font-size:smaller;'>bit.ly/operatorpattern</span></a></li> --> | |
</ol> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment