wso2 / kubernetes-apim

Kubernetes and Helm resources for WSO2 API Manager
Apache License 2.0
112 stars 216 forks source link

Error while deploying apim helm chart #535

Open lahirugmg opened 2 years ago

lahirugmg commented 2 years ago

Description: Trying to install helm chart locally and got this error

$ helm install apim-pattern-1-deploy wso2/am-pattern-1 --version 4.0.0-1 --namespace wso2 --create-namespace Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "extensions/v1beta1" Suggested Labels:

OS, DB, other environment details and versions:
Mac OS

rasenfer commented 2 years ago

Depending on your Kubernetes version, Ingress can be stored in other namespace of the api.

In mine (1.19) is on services-networking/ingress I have changed it on apiVersion. But I needed to add pathType parameter that is now mandatory and I changed serviceName y and servicePort declarations to the new sintaxis too.

This is my example for wso2am-ingress.yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
.................
rules:
  - host: {{ .Values.wso2.deployment.am.ingress.management.hostname }}
    http:
      paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: {{ template "am-single-node.resource.prefix" . }}-am-service
              port:
                number: 9443

I have needed to update these three files: wso2am-ingress.yaml wso2am-websub-ingress.yaml wso2am-gateway-ingress.yaml

Look at https://kubernetes.io/docs/concepts/services-networking/ingress/ for your version: