我正在 GOOGLE KUBERNETS VER 1.19 上安装 WSO2 API MANAGER git hub 上的舵图适用于 kubernetes ver 1.12 如何使它工作 1.19 [英] I AM INSTALLING WSO2 API MANAGER ON GOOGLE KUBERNETS VER 1.19 the helm chart on git hub works for kubernetes ver 1.12 how make it work1.19

查看:36
本文介绍了我正在 GOOGLE KUBERNETS VER 1.19 上安装 WSO2 API MANAGER git hub 上的舵图适用于 kubernetes ver 1.12 如何使它工作 1.19的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循 wso2 API MANAGER ON LINK 说明 https://artifacthub.io/packages/helm/wso2/am-single-node

git clone https://github.com/wso2/kubernetes-apim.git然后更新三个名为 wso2am-gateway-ingress.yaml、wso2am-ingress.yaml 和 wso2am-websub-的文件安装目录上的 ingress.yaml ~/kubernetes-apim/simple/am-single/templates/am 将 nginx 入口控制器与链接 https://kubernetes.io/docs/concepts/services-networking/ingress然后我通过运行代码安装了 WSO2
helm install /am-single --version 4.0.0-1 --namespace --dependency-update --create-namespace

代码在G8S Cluster ver1.19上运行成功

但我无法访问该服务查看我的链接以访问服务API 管理器发布者:http://35.245.157.84/publisherAPI 管理器开发门户:https://35.245.157.84/devportal

我做了什么

我使用以下三个文件克隆了 WSO2,位于 ~/kubernetes-apim/simple/am

文件 1) wso2am-gateway-ingress.yaml:

apiVersion: extensions/v1beta1种类:入口元数据:名称:{{ 模板am-single-node.resource.prefix";.}}-am-gateway-ingress命名空间:{{ .Release.Namespace }}{{- 如果 .Values.wso2.deployment.am.ingress.gateway.annotations }}注释:{{ toYaml .Values.wso2.deployment.am.ingress.gateway.annotations |缩进 4 }}{{- 结尾 }}规格:网址:- 主持人:- {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}规则:- 主机:{{ .Values.wso2.deployment.am.ingress.gateway.hostname }}网址:路径:- 小路:/后端:服务名称:{{ 模板am-single-node.resource.prefix";.}}-am-service服务端口:8243

编辑为

apiVersion:networking.k8s.io/v1种类:入口元数据:名称:{{ 模板am-single-node.resource.prefix";.}}-am-gateway-ingress命名空间:{{ .Release.Namespace }}{{- 如果 .Values.wso2.deployment.am.ingress.gateway.annotations }}注释:{{ toYaml .Values.wso2.deployment.am.ingress.gateway.annotations |缩进 4 }}{{- 结尾 }}规格:网址:- 主持人:- {{ .Values.wso2.deployment.am.ingress.gateway.hostname }}规则:- 主机:{{ .Values.wso2.deployment.am.ingress.gateway.hostname }}网址:路径:- 小路:/路径类型:实现特定后端:服务:名称:{{ 模板am-single-node.resource.prefix";.}}-am-service港口:号码:8243

文件 2) wso2am-ingress.yaml

apiVersion: extensions/v1beta1种类:入口元数据:名称:{{ 模板am-single-node.resource.prefix";.}}-am-ingress命名空间:{{ .Release.Namespace }}{{- 如果 .Values.wso2.deployment.am.ingress.management.annotations }}注释:{{ toYaml .Values.wso2.deployment.am.ingress.management.annotations |缩进 4 }}{{- 结尾 }}规格:网址:- 主持人:- {{ .Values.wso2.deployment.am.ingress.management.hostname }}规则:- 主机:{{ .Values.wso2.deployment.am.ingress.management.hostname }}网址:路径:- 小路:/后端:服务名称:{{ 模板am-single-node.resource.prefix";.}}-am-service服务端口:9443

编辑为

apiVersion:networking.k8s.io/v1种类:入口元数据:名称:{{ 模板am-single-node.resource.prefix";.}}-am-ingress命名空间:{{ .Release.Namespace }}{{- 如果 .Values.wso2.deployment.am.ingress.management.annotations }}注释:{{ toYaml .Values.wso2.deployment.am.ingress.management.annotations |缩进 4 }}{{- 结尾 }}规格:网址:- 主持人:- {{ .Values.wso2.deployment.am.ingress.management.hostname }}规则:- 主机:{{ .Values.wso2.deployment.am.ingress.management.hostname }}网址:路径:- 小路:/路径类型:实现特定后端:服务:名称:{{ 模板am-single-node.resource.prefix";.}}-am-service港口:号码:9443

文件 3) wso2am-websub-ingress.yaml

apiVersion: extensions/v1beta1种类:入口元数据:名称:{{ 模板am-single-node.resource.prefix";.}}-am-websub-ingress命名空间:{{ .Release.Namespace }}{{- 如果 .Values.wso2.deployment.am.ingress.websub.annotations }}注释:{{ toYaml .Values.wso2.deployment.am.ingress.websub.annotations |缩进 4 }}{{- 结尾 }}规格:网址:- 主持人:- {{ .Values.wso2.deployment.am.ingress.websub.hostname }}规则:- 主机:{{ .Values.wso2.deployment.am.ingress.websub.hostname }}网址:路径:- 小路:/后端:服务名称:{{ 模板am-single-node.resource.prefix";.}}-am-service服务端口:8021

编辑为

apiVersion:networking.k8s.io/v1种类:入口元数据:名称:{{ 模板am-single-node.resource.prefix";.}}-am-websub-ingress命名空间:{{ .Release.Namespace }}{{- 如果 .Values.wso2.deployment.am.ingress.websub.annotations }}注释:{{ toYaml .Values.wso2.deployment.am.ingress.websub.annotations |缩进 4 }}{{- 结尾 }}规格:网址:- 主持人:- {{ .Values.wso2.deployment.am.ingress.websub.hostname }}规则:- 主机:{{ .Values.wso2.deployment.am.ingress.websub.hostname }}网址:路径:- 小路:/路径类型:实现特定后端:服务:名称:{{ 模板am-single-node.resource.prefix";.}}-am-service港口:号码:8021

请克隆那个 wsos API MANAGER ON LIN K 指令 https://artifacthub.io/packages/helm/wso2/am-single-node

我通过克隆链接在 github 上使用 wso2 安装

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

请建议使用 helm ver3 检查我的 helm chart 以在 kubernetes 版本 1.19 上工作

查看我的链接以访问服务API 管理器发布者:http://35.245.157.84/publisherAPI 管理器开发门户:https://35.245.157.84/devportal

查看 curl https://am.wso2.com/publisher/-k

的输出

欢迎使用 Cloud Shell!输入帮助"开始.您在此会话中的 Cloud Platform 项目设置为 metal-contact-171112.使用gcloud config set project [PROJECT_ID]"更改为其他项目.dmalamo42@cs-881542484316-default-default-pc56l:~$ gcloud 容器集群 get-credentials beanworth-cluster-2 --zone us-east4-a --project metal-contact-171112获取集群端点和身份验证数据.为 beanworth-cluster-2 生成的 kubeconfig 条目.dmalamo42@cs-881542484316-default-default-pc56l:~$ curl https://am.wso2.com/publisher/-kcurl: (6) 无法解析主机:am.wso2.comdmalamo42@cs-881542484316-default-default-pc56l:~$ pwd/家/dmalamo42dmalamo42@cs-881542484316-default-default-pc56l:~$ sudo nano/etc/hostsdmalamo42@cs-881542484316-default-default-pc56l:~$ curl https://am.wso2.com/publisher/-k<!DOCTYPE html><!--~ 版权所有 (c) 2017, WSO2 Inc. (http://www.wso2.org) 保留所有权利.~~ WSO2 Inc. 在 Apache 许可下向您授予此文件的许可,~ 2.0 版(许可证");您不得使用此文件,除非~ 符合许可证.〜您可以在以下位置获得许可证的副本~~ http://www.apache.org/licenses/LICENSE-2.0~~ 除非适用法律要求或书面同意,~ 根据许可证分发的软件分发于〜原样"基础,没有任何保证或条件~ KIND,无论是明示的还是暗示的.请参阅许可证~ 管理权限和限制的特定语言~根据许可.--><html lang="en"><头><base href="/publisher/";/><meta charset="utf-8";/><meta http-equiv="X-UA-Compatible";内容=IE=边缘"/><元名称=视口"内容=宽度=1024,初始比例=1";/><!-- 以上 3 个元标记 * 必须* 排在首位;任何其他头部内容必须在*这些标签之后* --><title>[发布者门户]WSO2 APIM</title><link href="/publisher/site/public/css/main.css";类型=文本/css";rel=样式表"/><link href="/publisher/site/public/css/draftjs.css";类型=文本/css";rel=样式表"/><link rel="快捷方式图标";href=/publisher/site/public/images/favicon.ico"><身体><div id="react-root"><div class="apim-dual-ring"></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 工人已被移除,直到我们解决* https://github.com/wso2/product-apim/issues/10694 issue, webpack config 也需要修改 --><!--script src="/publisher/"></script--><link rel="样式表";href=/publisher/site/public/fonts/iconfont/material-icons.css"></html>dmalamo42@cs-881542484316-default-default-pc56l:~$

解决方案

我在 kubernetes-apim 文档:

<块引用>

3.添加映射主机名和外部 IP 的 DNS 记录

如果定义的主机名(在上一步中)由 DNS 支持服务,添加映射主机名和外部 IP 的 DNS 记录(EXTERNAL-IP) 在相关的 DNS 服务中.

如果定义的主机名不受 DNS 服务的支持,对于评估的目的,您可以添加一个条目映射主机名和客户端/etc/hosts文件中的外部IP.

所以看起来您需要使用自己的域并在 values.yaml 文件,或将已经存在的 Ingress 主机名从 values.yaml 添加到 /etc/hosts 文件.

I folow wso2 API MANAGER ON LIN K instruction https://artifacthub.io/packages/helm/wso2/am-single-node

git clone https://github.com/wso2/kubernetes-apim.gitthen 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 i cant access the service See my link to access the services API Manager Publisher: http://35.245.157.84/publisher API Manager DevPortal: https://35.245.157.84/devportal

what i did

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

See my link to access the services API Manager Publisher: http://35.245.157.84/publisher API Manager DevPortal: https://35.245.157.84/devportal

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:~$

解决方案

I've found in kubernetes-apim docs:

3. Add a DNS record mapping the hostnames and the external IP

If the defined hostnames (in the previous step) are backed by a DNS service, add a DNS record mapping the hostnames and the external IP (EXTERNAL-IP) in the relevant DNS service.

If the defined hostnames are not backed by a DNS service, for the purpose of evaluation you may add an entry mapping the hostnames and the external IP in the /etc/hosts file at the client-side.

<wso2.deployment.am.ingress.gateway.hostname>

So it looks like you need to either use your own domain and set Ingress hostnames in values.yaml file, or add the already existing Ingress hostnames from values.yaml to /etc/hosts file.

这篇关于我正在 GOOGLE KUBERNETS VER 1.19 上安装 WSO2 API MANAGER git hub 上的舵图适用于 kubernetes ver 1.12 如何使它工作 1.19的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆