Skip to content

Instantly share code, notes, and snippets.

@tikg
Last active February 9, 2023 04:32
Show Gist options
  • Save tikg/a5ee25c89dabff7e1c56f1cc7ce520db to your computer and use it in GitHub Desktop.
Save tikg/a5ee25c89dabff7e1c56f1cc7ce520db to your computer and use it in GitHub Desktop.

Here are the steps to set up Docker and Kubernetes for learning on your home desktop server:

Install Docker:

First, you'll need to install Docker on your desktop server. Follow the installation instructions for your operating system on the Docker website.

Install Minikube:

Minikube is a tool that makes it easy to run a single-node Kubernetes cluster locally. To install Minikube, follow the instructions for your operating system on the Minikube GitHub page.

Start Minikube:

Once Minikube is installed, you can start it using the following command:

#sql
minikube start

This will set up a virtual machine on your desktop server that runs a single-node Kubernetes cluster.

Verify Minikube is Running:

To verify that Minikube is running, run the following command:

minikube status

You should see that the cluster is running and that the Kubernetes context is set to the Minikube cluster.

Deploy a Sample Application:

Now that Minikube is running, you can deploy a sample application to the cluster. You can use the following command to deploy a simple web server: lua

kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10

Expose the Application:

The application is running inside the Minikube cluster, but it's not accessible from outside the cluster. To expose the application, you need to create a service:

kubectl expose deployment hello-minikube --type=NodePort --port=8080  

Access the Application:

You can access the application using the URL shown by the following command:

minikube service hello-minikube --url

These are the basic steps to set up Docker and Kubernetes for learning on your home desktop server. You can now start exploring and learning more about Docker and Kubernetes by deploying and managing applications in your Minikube cluster.

@tikg
Copy link
Author

tikg commented Feb 9, 2023

@tikg
Copy link
Author

tikg commented Feb 9, 2023

below commands worked well!

sudo docker system prune
sudo minikube delete
minikube start --driver=docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment