Thibault Deheurles
Thibault Deheurles

Reputation: 1269

kubernetes v1.1 baremetal => how to connect ingress to outside world

I have a setup of kubernetes on a coreos baremetal. For now I did the connection from outside world to service with a nginx reverse-proxy.

I'm trying the new Ingress resource. for now I have added a simple ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kube-ui
spec:
  backend:
    serviceName: kube-ui
    servicePort: 80

that starts like this:

INGRESS
NAME      RULE      BACKEND      ADDRESS
kube-ui   -         kube-ui:80

My question is how to connect from the outside internet to that ingress point as this resource have no ADDRESS ... ?

Upvotes: 3

Views: 1272

Answers (2)

Franci
Franci

Reputation: 2245

check this gist

This is for the ingress-nginx, not kubernetes-ingress

  1. Pre-requirement
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml
  1. Exposing hostNetwork (hope you know what you are doing. As documented, other than this, you can use nodePort or loadbalancer.)
    kubectl edit deployment.apps/nginx-ingress-controller -n ingress-nginx

add

template:
  spec:
    hostNetwork: true
  1. port forwarding
   apiVersion: v1
   kind: ConfigMap
   metadata:
     name: tcp-services
     namespace: ingress-nginx
   data:
     9000: "default/example-go:8080"
  1. Also, you can use ingress object to expose the service

Upvotes: 0

George
George

Reputation: 1110

POSTing this to the API server will have no effect if you have not configured an Ingress controller. You need to choose the ingress controller implementation that is the best fit for your cluster, or implement one. Examples and instructions can be found here.

Upvotes: 3

Related Questions