kong-dashboard icon indicating copy to clipboard operation
kong-dashboard copied to clipboard

Kong Dashboard on kubernetes

Open veris-neerajdhiman opened this issue 7 years ago • 10 comments

  • Is their anyway we can set-up this kong-dashboard on kubernetes.
  • I tried the same but since it will be set up in different container then it will not linked with kong setup on different container.
  • I have managed to setup kong on kubernetes using kong-dist-kubernetes

veris-neerajdhiman avatar Jun 06 '17 10:06 veris-neerajdhiman

I have this running on kubernetes with the following:

apiVersion: v1
kind: Service
metadata:
  name: kong-dashboard
spec:
  type: LoadBalancer
  loadBalancerSourceRanges:
    - 0.0.0.0/0
  ports:
    - name: kong-dashboard
      port: 8080
      targetPort: 8080
      protocol: TCP
  selector:
    app: kong-dashboard

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kong-dashboard
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: kong-dashboard
        app: kong-dashboard
    spec:
      containers:
        - name: kong-dashboard
          image: pgbi/kong-dashboard
          args: ["start", "--kong-url", "http://kong-admin:8001"]
          ports:
            - name: main
              containerPort: 8080
              protocol: TCP

Run kubectl create -f kong-dashboard.yaml to deploy a service and deployment.

update your args if your kong service isn't at kong-admin.

perryao avatar Jan 08 '18 15:01 perryao

@perryao there kong dashboard have open endpoint for healthcheck? if active basic auth google healthcheck will get error 401

dynastymasra avatar Feb 26 '18 13:02 dynastymasra

@dynastymasra Since https://github.com/PGBI/kong-dashboard/pull/146 has been merged, there is an healthcheck endpoint that returns 200 even when kong-dashboard requires authentication: GET /healthz

PGBI avatar Feb 26 '18 17:02 PGBI

thank you @PGBI about this info, i test it works fine

dynastymasra avatar Feb 27 '18 03:02 dynastymasra

@PGBI How to enable basic authentication on kong-dashboard iam trying to use it along with kubernetes.

azhar-mohammed avatar Mar 21 '18 08:03 azhar-mohammed

@azhar-mohammed you can insert command -basic-auth user1=password1 user2=password2 in kubernetes args, like args: ["-basic-auth user1=password1 user2=password2"]

dynastymasra avatar Mar 22 '18 03:03 dynastymasra

@dynastymasra thanks

azhar-mohammed avatar Mar 22 '18 04:03 azhar-mohammed

Tried with kong 1.4 for k8s

kubectl logs -f kong-dashboard-76cb774d89-9wz25 -n kong
Connecting to Kong on http://kong-kong-proxy:80 ...
What's on http://kong-kong-proxy:80 isn't Kong
C:\Users\samuelwa>kubectl get services -n kong
NAME              TYPE           CLUSTER-IP      EXTERNAL-IP       PORT(S)                      AGE
kong-dashboard    ClusterIP      10.96.239.158   <none>            8080/TCP                     5m6s
kong-kong-proxy   LoadBalancer   10.96.81.193    173.xxx.xxx.xxx   80:30464/TCP,443:32572/TCP   18m

Edit: disregard using kong v2 + didn't have admin initially exposed

sfxworks avatar Feb 11 '20 08:02 sfxworks

Hey guys,

In my infrastructure already have Kong, I want to use just dash, question, in this yaml, there is LoadBalancer Service, do I need this?

In Kong deployment I have a LB?

ioricloud avatar May 22 '20 17:05 ioricloud

I have this running on kubernetes with the following:

apiVersion: v1
kind: Service
metadata:
  name: kong-dashboard
spec:
  type: LoadBalancer
  loadBalancerSourceRanges:
    - 0.0.0.0/0
  ports:
    - name: kong-dashboard
      port: 8080
      targetPort: 8080
      protocol: TCP
  selector:
    app: kong-dashboard

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kong-dashboard
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: kong-dashboard
        app: kong-dashboard
    spec:
      containers:
        - name: kong-dashboard
          image: pgbi/kong-dashboard
          args: ["start", "--kong-url", "http://kong-admin:8001"]
          ports:
            - name: main
              containerPort: 8080
              protocol: TCP

Run kubectl create -f kong-dashboard.yaml to deploy a service and deployment.

update your args if your kong service isn't at kong-admin.

Hi perryao, I found this might work for me. But I'm not sure what should I put for the args. Below are the services I have: NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/echo ClusterIP 10.59.129.155 8080/TCP,80/TCP 145m service/ingress-kong LoadBalancer 10.59.128.195 34.101.177.232 8002:30160/TCP 150m service/kong-dashboard LoadBalancer 10.59.130.155 34.101.247.23 8080:30510/TCP 17m service/kong-proxy LoadBalancer 10.59.128.69 34.101.174.202 80:32661/TCP,443:31170/TCP 162m service/kong-validation-webhook ClusterIP 10.59.130.61 443/TCP

Really looking forward to hear from you. Thank you!

leojiang avatar Jul 08 '21 10:07 leojiang