Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error no KongIngress "do-not-preserve-host" #6

Open
ianmateusES opened this issue Mar 8, 2024 · 3 comments
Open

Error no KongIngress "do-not-preserve-host" #6

ianmateusES opened this issue Mar 8, 2024 · 3 comments

Comments

@ianmateusES
Copy link

Seguindo as aulas do módulo "API Gateway com Kong e Kubernetes", ao aplicar a configuração no Kubernetes usando o seguinte comando:

kubectl apply -f infra/kong-k8s/misc/apis/king.yaml -n bets

Encontrei o seguinte erro:

O KongIngress "do-not-preserve-host" é inválido: : Valor inválido: "object": o campo 'route' não é mais suportado, utilize as anotações do Ingress em seu lugar.

Como solução, o Copilot sugeriu a seguinte correção:

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
  name: do-not-preserve-host
  annotations:
    configuration.konghq.com/preserve-host: "false"
upstream:
  host_header: bets.bets.svc

Esta configuração resolveu o problema.

@gabrielcjr
Copy link
Collaborator

Olá @ianmateusES. Por favor, entre em contato comigo no discord pra vermos isto mais de perto. Meu user é gabrielcjr

@leandro-careplus
Copy link

Conseguiram resolver esse problema?

@leandro-careplus
Copy link

Para conhecimento. Resolvi esse problema instalando um CRD indicado no material abaixo:

https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-dbless.yaml

Generated by build-single-manifest.sh. DO NOT EDIT.

DEPRECATED

For Kong Ingress Controller 3.0+, please use Helm instead:

$ helm repo add kong https://charts.konghq.com

$ helm repo update

$ helm install kong/kong --generate-name --set ingressController.installCRDs=false

If you intend to use an older version, Helm is recommended but you still have the option

to install using manifests. In that case, replace the 'main' branch in your link with the

KIC tag. For example:

kubectl apply -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/v2.12.0/deploy/single/all-in-one-dbless.yaml

apiVersion: please-use-helm-to-install-kong
kind: Deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants