2

I am using the concourse helm build provided at https://github.com/kubernetes/charts/tree/master/stable/concourse to setup concourse inside of our kubernetes cluster. I have been able to get the setup working and I am able to access it within the cluster but I am having trouble accessing it outside the cluster. The notes from the build show that I can just use kubectl port-forward to get to the webpage but I don't want to have all of the developers have to forward the port just to get to the web ui. I have tried creating a service that has a node port like this:

apiVersion: v1
kind: Service
metadata:
  name: concourse
  namespace: concourse-ci
spec:
  ports:
  - port: 8080
    name: atc
    nodePort: 31080
  - port: 2222
    name: tsa
    nodePort: 31222
  selector:
    app: concourse-web
  type: NodePort

This allows me to get to the webpage and interact with it in most ways but then when I try to look at build status it never loads the events that happened. Instead a network request for /api/v1/builds/1/events is stuck in pending and the steps of the build never load. Any ideas what I can do to be able to completely access concourse external to the cluster?

EDIT: It seems like the events network request normally responds with a text/event-stream data type and maybe the Kubernetes service isn't handling an event stream correctly. Or there is something about concourse that handles event-streams different than the norm.

Colin Maxfield
  • 162
  • 1
  • 1
  • 12

4 Answers4

2

After plenty of investigation I have found that the the nodePort service is actually working and it is just my antivirus (Sophos) that is silently blocking the response from the events request.

Colin Maxfield
  • 162
  • 1
  • 1
  • 12
1

Also, you can expose your port through loadbalancer in kubernetes.

kubectl get deployments

kubectl expose deployment <web pod name> --port=80 --target-port=8080 --name=expoport --type=LoadBalancer

It will create a public IP for you, and you will be able to access concourse on port 80.

Chandra
  • 11
  • 3
0

not sure since I'm also a newbie but... you can configure your chart by providing your own version of https://github.com/kubernetes/charts/blob/master/stable/concourse/values.yaml

helm install stable/concourse -f custom_values.yaml

there is a 'externalURL' param, maybe worth trying to set it to your URL

  ## URL used to reach any ATC from the outside world.
  ##
  # externalURL:
  • I tried adding that and it doesn't seem to have changed anything. I also can't find much documentation about what really does. I am adding more about what seems to be causing a problem to my question. – Colin Maxfield Jun 28 '17 at 19:29
0

In addition, ... if you are on GKE, .... you can use an internal loadbalancer, ... set it up in your values.yaml file

  service:
    ## For minikube, set this to ClusterIP, elsewhere use LoadBalancer or NodePort
    ## ref: https://kubernetes.io/docs/user-guide/services/#publishing-services---service-types
    ##
    #type: ClusterIP
    type: LoadBalancer

    ## When using web.service.type: LoadBalancer, sets the user-specified load balancer IP
    # loadBalancerIP: 172.217.1.174

    ## Annotations to be added to the web service.
    ##
    annotations:
      # May be used in example for internal load balancing in GCP:
      cloud.google.com/load-balancer-type: Internal