Rancher Desktop Kubernetes
Rancher Desktop is an open-source project to bring Kubernetes and container management to your workstation.
For more information about installing Rancher Desktop or containers, check out a previous post.
If you are not familiar with Kubernetes, check out a previous post about getting started.
Installation is trivial on most platforms, I will briefly touch on installation on Linux as I happen to be using openSUSE at the time of this post.
AppImage install
To use the AppImage, ensure the file is executable and then execute it. This file can be used on multiple Linux distributions, the libraries are bundled with the app.
|
|
RPM package installation
⚠️ Note: Red Hat based distributions such as Fedora package QEMU, which is needed here, differently than other distributions. If using a Red Hat distro, use the AppImage download instead.
On openSUSE:
|
|
Once the installation completes, you can find the application under the “Development” category on the Application launcher for most Linux desktop environments such as GNOME, KDE, XFCE, or MATE.
RPM uninstall
To uninstall this application, remove the package and for zypper
, add the --clean-deps
flag to remove dependencies. The command zypper removerepo
will remove the rancher package repository from your system.
|
|
Kubernetes
Once Rancher Desktop is installed and running, verify that the kubernetes cluster was created in a terminal. The command kubectl
should be added to your $PATH
:
|
|
You should see a single node which is the vm that was created on your local machine:
|
|
Deploying a simple application
Deploy a web application and view it on your browser:
|
|
Verify the container was deployed:
|
|
You should see Status: “Running”. The container was deployed but is only accessible on the kubernetes cluster network. To make the application available outside the cluster, a Service API object must be created and associated with the deployment.
|
|
View the new service:
|
|
Now we can view the service by using the kube-proxy to proxy the service to a port on the local computer:
|
|
This will proxy traffic to the container on port 8080
of the local computer where rancher desktop is installed.
Navigate to http://localhost:8080 in your browser to view the hello-world application.
Rancher desktop can easily be used to run containers/k8s on your machine for development and testing.
Application settings
The Rancher desktop application allows you to manage container images, adjust the version of kubernetes used, reset the kubernetes cluster completely, as well as manage the supporting utilities such as kubectl
, nerdctl
, and helm
.
The desktop application will also prompt and guide the process of updating to the latest version.