WSO2 API manager version 4.0.0-1 Helm installation issue on Kubernetes ver 1.19 it was made for K8S version below VERS1.2

5/27/2021

I am installing API Manager on My GCP Cluster using helm chart (https://artifacthub.io/packages/helm/wso2/am-single-node) using git clone methods

after changing the three files(wso2am-gateway-ingress.yaml, wso2am-ingress.yaml and wso2am-websub-ingress.yam ) following Kubernetes website info tips on https://kubernetes.io/docs/concepts/services-networking/ingress/

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-resource-backend
spec:
  defaultBackend:
    resource:
      apiGroup: k8s.example.com
      kind: StorageBucket
      name: static-assets
  rules:
    - http:
        paths:
          - path: /icons
            pathType: ImplementationSpecific
            backend:
              resource:
                apiGroup: k8s.example.com
                kind: StorageBucket
                name: icon-assets

I use WSO2 installation instruction from https://artifacthub.io/packages/helm/wso2/am-single-node I installed helm then nginix ingress controller successfully on namespace beanworth2

w with command

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update

helm install ingress-nginx ingress-nginx/ingress-nginx

then i installed WSO2 API MANAGER​as shown below by clonning wso2 from git git clone https://github.com/wso2/kubernetes-apim.git then updating three files named wso2am-gateway-ingress.yaml, wso2am-ingress.yaml and wso2am-websub-ingress.yaml on installation directory ~/kubernetes-apim/simple/am-single/templates/am match nginx ingress controller with link https://kubernetes.io/docs/concepts/services-networking/ingress then i installed WSO2 by run the code
helm install <RELEASE_NAME> <HELM_HOME>/am-single --version 4.0.0-1 --namespace <NAMESPACE> --dependency-update --create-namespace

the code run successfully on G8S Cluster ver1.19 but when i access tthroughthe browser it ddisplayPAGE NOT FOUNG 404 NGINIX API Manager Publisher: https://ingress loadbalacer EXTERNAL IP/publisher API Manager DevPortal: https://ingress loadbalacer EXTERNAL IP/devportal it dispaly PAGE NOT FOUNG 404 NGINIX

see my files after alteration to fit with k8s version 1.19 wso2am-gateway-ingress.yaml:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-gateway-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.gateway.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.gateway.annotations | indent 4 }}
{{- end }}
spec:
  tls:
  - hosts:
    - {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
  rules:
  - host: {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: {{ template "am-single-node.resource.prefix" . }}-am-service
            port:
              number: 8243
dmalamo42@cs-881542484316-default-default-x8lsg:~/ws02project2/kubernetes-apim/simple/am-single/templates/am$

wso2am-ingress.yaml:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.management.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.management.annotations | indent 4 }}
{{- end }}
spec:
  tls:
    - hosts:
        - {{ .Values.wso2.deployment.am.ingress.management.hostname }}
  rules:
    - host: {{ .Values.wso2.deployment.am.ingress.management.hostname }}
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: {{ template "am-single-node.resource.prefix" . }}-am-service
                port:
                  number: 9443
dmalamo42@cs-881542484316-default-default-x8lsg:~/ws02project2/kubernetes-apim/simple/am-single/templates/am$

wso2am-websub-ingress.yaml:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-websub-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.websub.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.websub.annotations | indent 4 }}
{{- end }}
spec:
  tls:
  - hosts:
    - {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
  rules:
  - host: {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: {{ template "am-single-node.resource.prefix" . }}-am-service
            port:
              number: 8021
dmalamo42@cs-881542484316-default-default-x8lsg:~/ws02project2/kubernetes-apim/simple/am-single/templates/am$

it is installed successfully with no error on GCP Cluster gcloud console but when i access it through the browser it display PAGE NOT FOUNG 404 NGINIX API Manager Publisher: https://ingress loadbalacer EXTERNAL IP/publisher API Manager DevPortal: https://ingress loadbalacer EXTERNAL IP/devportal it display PAGE NOT FOUNG 404 NGINIX

check my three codes on wwso2am-gateway-ingress.yaml, wso2am-ingress.yaml and wso2am-websub-ingress.yam files and advise

see the output of curl https://am.wso2.com/publisher/ -k

Welcome to Cloud Shell! Type "help" to get started.
Your Cloud Platform project in this session is set to metal-contact-171112.
Use “gcloud config set project [PROJECT_ID]” to change to a different project.
dmalamo42@cs-881542484316-default-default-pc56l:~$ gcloud container clusters get-credentials beanworth-cluster-2 --zone us-east4-a --project metal-contact-171112
Fetching cluster endpoint and auth data.
kubeconfig entry generated for beanworth-cluster-2.
dmalamo42@cs-881542484316-default-default-pc56l:~$ curl https://am.wso2.com/publisher/ -k
curl: (6) Could not resolve host: am.wso2.com
dmalamo42@cs-881542484316-default-default-pc56l:~$ pwd
/home/dmalamo42
dmalamo42@cs-881542484316-default-default-pc56l:~$ sudo nano /etc/hosts
dmalamo42@cs-881542484316-default-default-pc56l:~$ curl https://am.wso2.com/publisher/ -k
<!DOCTYPE html>
<!--
  ~ Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<html lang="en">


<head>
    <base href="/publisher/" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=1024, initial-scale=1" />
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>[Publisher Portal]WSO2 APIM</title>

    <link href="/publisher/site/public/css/main.css" type="text/css" rel="stylesheet" />
    <link href="/publisher/site/public/css/draftjs.css" type="text/css" rel="stylesheet" />
    <link rel="shortcut icon" href="/publisher/site/public/images/favicon.ico">
</head>

<body>

    <div id="react-root">
        <div class="apim-dual-ring"></div>
    </div>

    <script src="/publisher/site/public/fonts/iconfont/MaterialIcons.js"></script>
    <script src="/publisher/site/public/conf/userThemes.js"></script>
    <script src="/publisher/site/public/conf/portalSettings.js"></script>
    <script src="/publisher/services/settings/settings.js"></script>
    <script src="/publisher/site/public/dist/index.7422e2feefc0de743eb6.bundle.js"></script>
    <!-- Swagger worker has being removed until we resolve
     *              https://github.com/wso2/product-apim/issues/10694 issue, need to change webpack config too -->
    <!--script src="/publisher/"></script-->
    <link rel="stylesheet" href="/publisher/site/public/fonts/iconfont/material-icons.css">
</body>

</html>dmalamo42@cs-881542484316-default-default-pc56l:~$

SUMMARY OF MY QUESTION

I cloned WSO2 with the three files as shown below located on ~/kubernetes-apim/simple/am

file 1) wso2am-gateway-ingress.yaml:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-gateway-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.gateway.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.gateway.annotations | indent 4 }}
{{- end }}
spec:
  tls:
  - hosts:
    - {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
  rules:
  - host: {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
    http:
      paths:
      - path: /
        backend:
          serviceName: {{ template "am-single-node.resource.prefix" . }}-am-service
          servicePort: 8243

Editted to

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-gateway-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.gateway.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.gateway.annotations | indent 4 }}
{{- end }}
spec:
  tls:
  - hosts:
    - {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
  rules:
  - host: {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: {{ template "am-single-node.resource.prefix" . }}-am-service
            port:
              number: 8243

file 2) wso2am-ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.management.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.management.annotations | indent 4 }}
{{- end }}
spec:
  tls:
    - hosts:
        - {{ .Values.wso2.deployment.am.ingress.management.hostname }}
  rules:
    - host: {{ .Values.wso2.deployment.am.ingress.management.hostname }}
      http:
        paths:
          - path: /
            backend:
              serviceName: {{ template "am-single-node.resource.prefix" . }}-am-service
              servicePort: 9443

Editted to

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.management.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.management.annotations | indent 4 }}
{{- end }}
spec:
  tls:
    - hosts:
        - {{ .Values.wso2.deployment.am.ingress.management.hostname }}
  rules:
    - host: {{ .Values.wso2.deployment.am.ingress.management.hostname }}
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: {{ template "am-single-node.resource.prefix" . }}-am-service
                port:
                  number: 9443

file 3) wso2am-websub-ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-websub-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.websub.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.websub.annotations | indent 4 }}
{{- end }}
spec:
  tls:
  - hosts:
    - {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
  rules:
  - host: {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
    http:
      paths:
      - path: /
        backend:
          serviceName: {{ template "am-single-node.resource.prefix" . }}-am-service
          servicePort: 8021

editted to

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{ template "am-single-node.resource.prefix" . }}-am-websub-ingress
  namespace : {{ .Release.Namespace }}
{{- if .Values.wso2.deployment.am.ingress.websub.annotations }}
  annotations:
{{ toYaml .Values.wso2.deployment.am.ingress.websub.annotations | indent 4 }}
{{- end }}
spec:
  tls:
  - hosts:
    - {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
  rules:
  - host: {{ .Values.wso2.deployment.am.ingress.websub.hostname }}
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: {{ template "am-single-node.resource.prefix" . }}-am-service
            port:
              number: 8021

please clone that wsos API MANAGER ON LIN K instruction https://artifacthub.io/packages/helm/wso2/am-single-node

i use the wso2 installation on github by cloning the link

git clone https://github.com/wso2/kubernetes-apim.git

please advise to check my helm chart using helm ver3 to work on kubernetes version 1.19

-- Deogratias malamo
google-kubernetes-engine
kubernetes
kubernetes-helm
nginx
wso2

0 Answers