regarding type=NodePort the docs say If you set the type field to "NodePort", the Kubernetes master will > allocate a port from a flag-configured range (default: 30000-32767), and > each Node will proxy that port (the same port number on every Node) into > your Service. That port will be reported in your Service’s > spec.ports[*].nodePort field. >
so you either specify this number in that range and open NodeIP:NodePort or let it pick random and you query this port from kubectl desc service XYZ ----- the other option is keep it type=ClusterIP (the default type) but to specify ExternalIPs, the docs say In the ServiceSpec, externalIPs can be specified along with any of the > ServiceTypes. In the example below, my-service can be accessed by clients > on 80.11.12.10:80 (externalIP:port) > On Wed, Jul 13, 2016 at 10:29 AM, Rafiqul Islam <rafi...@telenordigital.com> wrote: > Thanks for help replying. > I am not sure how cluster IP will work, let me go through the links, and I > will revert go to you. > > On Mon, Jul 11, 2016 at 1:55 PM, Muayyad AlSadi <als...@gmail.com> wrote: > >> I guess you can specify type=NodePort >> >> or use specify externalIPs with type=ClusterIP (which is the default >> type) >> >> kubectl describe service NAME >> >> >> http://kubernetes.io/docs/api-reference/v1/definitions/#_v1_servicespec >> http://kubernetes.io/docs/user-guide/services/ >> http://kubernetes.io/docs/user-guide/load-balancer/ >> http://kubernetes.io/docs/user-guide/services/operations/ >> >> On Mon, Jul 11, 2016 at 7:28 AM, Rafiqul Islam < >> rafi...@telenordigital.com> wrote: >> >>> Thanks for the reply. >>> >>> Questions: >>> >>> 1. What distro of Atomic are you using? >>> Fedora-Cloud-Atomic-23-20160607.x86_64-ap-southeast-2-HVM-standard-0 >>> (ami-0f69406c) >>> >>> 2. How have you set up the Services for those pods? >>> created cluster based on >>> http://www.projectatomic.io/docs/gettingstarted/ >>> >>> Its simple ngingx deployment and created service using >>> >>> kubectl expose deployment my-nginx --port=80 >>> >>> web server is accessible only within the cluster not from outside the >>> cluster to external network. >>> >>> >>> On Thu, Jul 7, 2016 at 1:16 AM, Josh Berkus <jber...@redhat.com> wrote: >>> >>>> On 06/21/2016 01:37 PM, Rafiqul Islam wrote: >>>> > Dear Team >>>> > Thanks for this wonderful project. I have created a kuberntes cluster >>>> > based on fedora atomic image >>>> > (http://www.projectatomic.io/docs/gettingstarted/) . We can run >>>> > applications running on pods from inside the network. However we are >>>> not >>>> > able access these application from external network. There may be a >>>> load >>>> > balancer concept to expose services to external network. Could you >>>> > please help enlighten me on the load balancer to expose services to >>>> > external network? >>>> >>>> Sorry for hold on this; we had a glut of spam and I didn't notice your >>>> question waiting in moderation. >>>> >>>> Questions: >>>> >>>> 1. What distro of Atomic are you using? >>>> >>>> 2. How have you set up the Services for those pods? >>>> >>>> -- >>>> -- >>>> Josh Berkus >>>> Project Atomic >>>> Red Hat OSAS >>>> >>> >>> >>> >>> -- >>> >>> *Rafiqul Islam* | Technology, Ops, and Infrastructure Lead >>> >>> *M*: +8801709651000 >>> >>> *Skype*: islamraofu | *E*: rafi...@telenordigital.com >>> >> >> > > > -- > > *Rafiqul Islam* | Technology, Ops, and Infrastructure Lead > > *M*: +8801709651000 > > *Skype*: islamraofu | *E*: rafi...@telenordigital.com >