Practice deploying Nginx with kubernetes on portainer when you don’t have a server?

Tram Ho

Sometimes you learn some devOps theory, want to be able to practice with no budget? This problem is solved by katacoda – the site for fastest possible practice with kubernetes.


With DevOps practice is essential after having theory, it only takes a while for you to forget what you learn without practice. Katacoda offers steps by steps courses to reach the fastest user who can understand how the system runs?

Launch kubernetes on katacoda

We will run to initialize 2 Kubernetes nodes, of which 1 node is master.

Install portainer on katacoda

The terminal part of the master node we run the following two lines of code.

Here we have 2 options to open portainer:

  • The first option is to run the command line forward service portainer to port 9000 running locally
  • The second option we access directly to port 30777 with the existing node-ip address

Since we are currently remote to katacoda’s server, the first option is not feasible, we will use option 2 since we can access remote node-ip.

Select View HTTP port 8080 on Host 1 and select port 30777

Create an admin account for the first time

Select default Kubernetes

Setup Nginx

Click Home with the Endpoints local entries

Select Applications with button + Add Application

We will have a simple setup as follows

In a nutshell, the test name has an image of nginx using the default resource namespace, and other configs like ENV do not. In the hardware resource, I leave unlimited. The replicated number created I chose is 10 replicas to run the svc (services nginx).

We wait for enough replicated to be made ready for access

Go to detail of the application test

Here the cluster node port is 30862. we will access them via kataconda as we did above, the result will be nginx default page:


Share the news now

Source : Viblo