Giter Club home page Giter Club logo

Comments (9)

ddy86 avatar ddy86 commented on May 27, 2024 1

@subicura kubernetes-ingress-controller for kong is released just a few days, the document is not very perfect. I also get some problems,like I can't create the jwt credential bound one consumer.
Yours issue is same to me, I will try again and then tell you.

from kubernetes-ingress-controller.

hbagdi avatar hbagdi commented on May 27, 2024 1

@elboletaire That's correct.
Reference: https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/custom-resources.md#kongingress

from kubernetes-ingress-controller.

subicura avatar subicura commented on May 27, 2024

https://github.com/Kong/kubernetes-ingress-controller/blob/master/internal/ingress/controller/kong.go#L245

It needs pull request?

from kubernetes-ingress-controller.

ddy86 avatar ddy86 commented on May 27, 2024

You can try to add an annotation named "request-transformer.plugin.konghq.com" to the Ingress. see more info in https://github.com/Kong/kubernetes-ingress-controller/blob/master/deploy/minikube.md
I config the k8s Ingress like the guid and go right.

  • ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: proxy-from-k8s-to-mockbin
  namespace: kong
  annotations:
    request-transformer.plugin.konghq.com: |
      transform-request-to-mockbin
    jwt.plugin.konghq.com: |
      wechat-jwt
spec:
  rules:
  - host: foo.bar
    http:
      paths:
      - path: /request
        backend:
          serviceName: proxy-to-mockbin
          servicePort: 80
  • svc.yaml
kind: Service
apiVersion: v1
metadata:
  name: proxy-to-mockbin
  namespace: kong
spec:
  ports:
  - protocol: TCP
    port: 80
  type: ExternalName
  externalName: mockbin.org
  • request-transformer.yaml
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: transform-request-to-mockbin
  namespace: kong
config:
  remove:
    headers: host

from kubernetes-ingress-controller.

subicura avatar subicura commented on May 27, 2024

@Daiyoung thanks for reply!

But, I want to tranform "path".

For example, I create 2 api(service/route).

Is it possible to use request-transformer?

from kubernetes-ingress-controller.

elboletaire avatar elboletaire commented on May 27, 2024

Sorry to revive this post but I can't get this working 😕

I'm trying to configure a service using the /doc path.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: html2doc-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - http:
      paths:
      - path: /doc
        backend:
          serviceName: html2doc-svc
          servicePort: 80

My service receives calls at /{format} where format can be, among others, pdf.

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  name: html2doc-kongingress
proxy:
  path: /
route:
  strip_path: true

Even after adding the above KongIngress controller nothing seems to change. When I call /doc I can see in my pod logs that it's trying to access /doc:

imatge

Am I doing something wrong? BTW sorry to bother you, I'm kinda newbie in k8s....

from kubernetes-ingress-controller.

elboletaire avatar elboletaire commented on May 27, 2024

Ok, I got it... the Ingress controller and the KongIngress controller need to have the same metadata.name. BTW if anyone can confirm me I'm not doing something evil, I'll thank them.

from kubernetes-ingress-controller.

Raghavendarlokineni avatar Raghavendarlokineni commented on May 27, 2024

@elboletaire That's correct.
Reference: https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/custom-resources.md#kongingress

this seems to be a broken link now

from kubernetes-ingress-controller.

hbagdi avatar hbagdi commented on May 27, 2024

this seems to be a broken link now

Here is the new one:
https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/concepts/custom-resources.md

from kubernetes-ingress-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.