# apiVersion: v1
# kind: Service
# metadata:
#   name: konga
# spec:
#   type: NodePort
#   ports:
#   - name: konga
#     port: 1337
#     targetPort: 1337
#     protocol: TCP
#   selector:
#     app: konga
 
# ---
# apiVersion: extensions/v1beta1
# kind: Deployment
# metadata:
#   name: konga
# spec:
#   replicas: 1
#   template:
#     metadata:
#       labels:
#         name: konga
#         app: konga
#     spec:
#       containers:
#       - name: konga
#         image: pantsel/konga:0.14.1
#         env:
#           - name: DB_DATABASE
#             value: k8s_konga
#           - name: DB_USER
#             valueFrom:
#               configMapKeyRef:
#                   name: zhichan-config
#                   key: DB_USER
#           - name: DB_PASSWORD
#             valueFrom:
#               configMapKeyRef:
#                   name: zhichan-config
#                   key: DB_PWD
#           - name: DB_PORT
#             valueFrom:
#               configMapKeyRef:
#                   name: zhichan-config
#                   key: DB_PORT
#           - name: DB_ADAPTER
#             value: mysql
#           - name: DB_HOST
#             valueFrom:
#               configMapKeyRef:
#                   name: zhichan-config
#                   key: DB_HOST
#           - name: NODE_ENV
#             value: production
#           - name: TOKEN_SECRET
#             value: testtoken
#         ports:
#         - name: konga
#           containerPort: 1337
#           protocol: TCP



apiVersion: v1
kind: Service
metadata:
  name: kong-dashboard
  namespace: kong
spec:
  type: NodePort
  ports:
  - name: kong-dashboard
    port: 80
    targetPort: 8080
    protocol: TCP
  selector:
    app: dashboard
---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: dashboard
  namespace: kong
spec:
  template:
    metadata:
      labels:
        name: dashboard
        app: dashboard
    spec:
      containers:
      - name: kong-dashboard
        args:
        - start
        - --kong-url http://kong-ingress-controller:8001
        - --basic-auth admin=admin
        image: pgbi/kong-dashboard:latest
        ports:
        - name: http
          containerPort: 8080
          protocol: TCP
          


apiVersion: v1
kind: Service
metadata:
  name: kong-admin
  namespace: kong
spec:
  ports:
  - name: kongadmin
    port: 8001
    protocol: TCP
    targetPort: 8001
  selector:
    app: ingress-kong




    curl -v -H "Host: webshell.com" 123.57.217.203:1880
