Home Explore Blog CI



kubernetes

5th chunk of `content/en/blog/_posts/2017-11-00-Kubernetes-Easy-Way.md`
1adc7c67cfc034d5af09ae0f860d84199ee018d6a87f9fbc000000010000054b
![](https://lh4.googleusercontent.com/YzQzEdIMwWt3lGR9Q4RTELvaB_fYYo2QKqkeXhfTCDnIVX4FBx_quYNgAbo6Wc_wpk0anl7Co3RDwDWnrOyibog9V9DISOZYQqiFE9T4ErlDYuqOGWiRw3-zk4p4WcURaOVg3Dkn)

Here’s the info we need to pass:  

**Cluster** - This is the cluster we added earlier, our application will be deployed there.   
**Namespace** - We’ll use default for our namespace but you can create and use a new one if you’d prefer. Namespaces are discrete units for grouping all the services associated with an application.   
**Service name** - You can name the service whatever you like. Since we’re deploying Mongo, I’ll just name it mongo!  
**Expose port** - We don’t need to expose the port outside of our cluster so we won’t check the box for now but we will specify a port where other containers can talk to this service. Mongo’s default port is ‘27017’.   
**Image** - Mongo is a public image on Dockerhub, so I can reference it by name and tag, ‘mongo:latest’.  
**Internal Ports** - This is the port the mongo application listens on, in this case it’s ‘27017’ again.   

We can ignore the other options for now.   

3. Scroll down and click **Deploy**.  

 ![](https://lh4.googleusercontent.com/4dhWXsf0BhyDDyB6XmmuCo2RCNztTPNuy36lYuzAHEYsFmKKkS6ibbKKo3sIqyQIYNTsTE6m5fjtlnEB0gmYoeQ40DZjwuSVyO4-pQKPjZflDT75NZ61aytXnEhFiAUHUDk9l1Wj)

Title: Configuring and Deploying a Service to Kubernetes
Summary
The process involves specifying the cluster, namespace (default is used here), service name (e.g., 'mongo'), and the Docker image ('mongo:latest'). The internal port (27017 for Mongo) is also defined. Exposing the port is skipped for this example, and finally, the service is deployed.