How to run user defined pod correctly in Kubernetes?

358 views Asked by At

I'm new to Kubernetes. I installed it on my local Ubuntu 14.04 machine. I want to run nginx server and I want see it in my browser. I'm following this section.

It's saying

However you cannot view the nginx start page on localhost. To verify that nginx is running you need to run curl within the docker container (try docker exec).

I tried below instruction to check server is running.

# docker exec -it d0ef46bcdb8b bash
root@nginx:/# service ngix status
nginx is running.

Now I want to see it in webpage.

You can control the specifications of a pod via a user defined manifest, and reach nginx through your browser on the port specified therein:

cluster/kubectl.sh create -f examples/pod.yaml

But I don't how to edit the manifest. How I get nginx through browser?

1

There are 1 answers

0
Robert Bailey On

The manifest that the documentation is referring to is here. Copy this file onto your local machine (or find it on your system if you've already downloaded a copy of the git repository). You can edit the file using your favorite web browser and then run kubectl create -f pod.yaml to tell the system to create the pod.