This is a step-by-step guide to install and run Kubernetes on your Mac with Argo workflow engine so that you can develop applications locally and play around with this new framework.
-
Table of Content
- Install kubectl on macOS
- Install hypervisor (Docker)on mac.
- Install minikube on mac.
- Install Argo Workflow.
-
Pre-requisite
- The only pre-requisite for this guide is that you should have Homebrew installed. Homebrew is a package manager for the Mac. You’ll also need Homebrew Cask, which you can install after Homebrew by running brew tap caskroom/cask in your Terminal.
Steps to install kubectl on macOS:
The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.
Install with Homebrew on macOS
If you are on macOS and using Homebrew package manager, you can install kubectl with Homebrew.
- Run the installation command:
brew install kubectl
OR
brew install kubernetes-cli
- Test to ensure the version you installed is up-to-date:
Installing hypervisor (Docker):
This is the very first step after we fulfill the pre-requisite. We can use any of the following hypervisors to run Kubernetes (minikubes) on mac.
-
HyperKit- HyperKit is a toolkit for embedding hypervisor capabilities in your application. It includes a complete hypervisor, based on xhyve/bhyve, which is optimized for lightweight virtual machines and container deployment. It is designed to be interfaced with higher-level components such as the VPNKit and DataKit.
-
VirtualBox. We can also install VirtualBox by running Run brew cask install virtualbox in your Terminal. VirtualBox lets you run virtual machines on your Mac (like running Windows inside macOS, except for a Kubernetes cluster).
-
Docker - Installing docker is pretty straightforward, follow the link for setup file. Once you install docker desktop using setup file from the mentioned link, you will see docker icon your menu bar at top left corner.
Install minikube-
- Installation Steps:
The easiest way to install Minikube on macOS is using Homebrew:
brew install minikube
Once you run the above command it will install all the components of minikube for you.
**Note: If for some reasons the above installation method doesn't work then you can follow these steps:
- You can also install it on macOS by downloading a stand-alone binary:
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 \ && chmod +x minikube
- Here's an easy way to add the Minikube executable to your path:
sudo mv minikube /usr/local/bin
- Confirm minikube Installation:
To confirm successful installation of both a hypervisor and Minikube, you can run the following command to start up a local Kubernetes cluster:
``` javascript
minikube start
```
Once minikube start finishes, run the command below to check the status of the cluster:
``` javascript
minikube status
```
If your cluster is running, the output from minikube status should be similar to:
```
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
After you have confirmed whether Minikube is working with your chosen hypervisor, you can continue to use Minikube or you can stop your cluster. To stop your cluster, run:
``` javascript
minikube stop
Install Argo Workflows:
Argo Workflows is an open-source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Argo Workflows is implemented as a Kubernetes CRD.
To get started quickly, you can use the quick start manifest which will install Argo Workflow as well as some commonly used components:
kubectl create ns argo
kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/stable/manifests/quick-start-postgres.yaml
To run Argo Workflows locally (e.g. using Minikube or Docker for Desktop), then open a port forward so you can access the namespace:
kubectl -n argo port-forward deployment/argo-server 2746:2746
This user can access the interface on https://localhost:2746
Finally, submit an example workflow:
argo submit -n argo --watch https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml
argo list -n argo
argo get -n argo @latest
argo logs -n argo @latest
This is a step-by-step guide to install and run Kubernetes on your Mac with Argo workflow engine so that you can develop applications locally and play around with this new framework.
Table of Content
Pre-requisite
Steps to install kubectl on macOS:
The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.
Install with Homebrew on macOS
If you are on macOS and using Homebrew package manager, you can install kubectl with Homebrew.
Installing hypervisor (Docker):
This is the very first step after we fulfill the pre-requisite. We can use any of the following hypervisors to run Kubernetes (minikubes) on mac.
HyperKit- HyperKit is a toolkit for embedding hypervisor capabilities in your application. It includes a complete hypervisor, based on xhyve/bhyve, which is optimized for lightweight virtual machines and container deployment. It is designed to be interfaced with higher-level components such as the VPNKit and DataKit.
VirtualBox. We can also install VirtualBox by running
Run brew cask install virtualboxin your Terminal. VirtualBox lets you run virtual machines on your Mac (like running Windows inside macOS, except for a Kubernetes cluster).Docker - Installing docker is pretty straightforward, follow the link for setup file. Once you install docker desktop using setup file from the mentioned link, you will see docker icon your menu bar at top left corner.
Install minikube-
- Installation Steps:
The easiest way to install Minikube on macOS is using Homebrew:
brew install minikubeOnce you run the above command it will install all the components of
minikubefor you.**Note: If for some reasons the above installation method doesn't work then you can follow these steps:
- Confirm
minikubeInstallation:To confirm successful installation of both a hypervisor and Minikube, you can run the following command to start up a local Kubernetes cluster:
Once minikube start finishes, run the command below to check the status of the cluster:
If your cluster is running, the output from minikube status should be similar to:
Install Argo Workflows:
Argo Workflows is an open-source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Argo Workflows is implemented as a Kubernetes CRD.
To get started quickly, you can use the quick start manifest which will install Argo Workflow as well as some commonly used components:
To run Argo Workflows locally (e.g. using Minikube or Docker for Desktop), then open a port forward so you can access the namespace:
This user can access the interface on
https://localhost:2746Finally, submit an example workflow: