You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/12 08:43:15 UTC

[GitHub] [apisix-dashboard] lazychanger opened a new issue, #2424: 使用k8s apisix-dashboard 配置其他命名空间 DNS 服务时候出现 service xxx not found

lazychanger opened a new issue, #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424

   ### Issue description
   
   ## 基本情况
   - namespace: ingress-apisix
     - apisix
     - apisix-ingress-controlls
     - apisix-admin
     - apisix-dashboard
   - namespace: default
     - nginx
   
   ## 操作流程
   1. 创建上游
   <img width="1405" alt="image" src="https://user-images.githubusercontent.com/20916944/162917364-985ce050-972c-464b-a0df-53e567d84db4.png">
   2. 创建路由
   3. 访问路由
   4. 503 Service Temporarily Unavailable
   <img width="1445" alt="image" src="https://user-images.githubusercontent.com/20916944/162918208-22468f9f-dc09-48c3-90e7-1df2b966f2d9.png">
   
   ## 具体代码
   https://github.com/apache/apisix-ingress-controller/blob/b7dd90ad9d6a5102fe67c91c29ab76fc4bad4b1a/pkg/kube/translation/util.go#L38
   
   ## 通过kubectl create设置命名空间就可以访问
   ```yaml
   ---
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: nginx
     namespace: default
   spec:
     http:
       - name: nginx
         match:
           hosts:
             - test.xxxx.com
           paths:
             - "/*"
         backends:
           - serviceName: nginx-headless
             servicePort: 80
   ```
   
   <img width="1378" alt="image" src="https://user-images.githubusercontent.com/20916944/162918478-faa9d32f-f7e6-4734-9a15-17e603657368.png">
   
   
   ### Expected behavior
   
   service "nginx-headless.default.svc.cluster.local" not found
   
   ### How to Reproduce
   
   如问题描述
   
   ### Screenshots
   
   _No response_
   
   ### Environment
   
   ## ENV
   <img width="967" alt="image" src="https://user-images.githubusercontent.com/20916944/162918714-92c4a11a-872e-44d2-821f-0fc24d28bc70.png">
   
   ## install shell
   ```yaml
   helm repo add apisix https://charts.apiseven.com
   
   helm repo add bitnami https://charts.bitnami.com/bitnami
   
   helm repo update
   
   helm install apisix apisix/apisix \
     --set gateway.type=LoadBalancer \
     --set ingress-controller.enabled=true \
     --set etcd.persistence.storageClass="apisix" \
     --set etcd.persistence.size="20Gi" \
     --namespace ingress-apisix \
     --set gateway.tls.enabled=true \
     --set ingress-controller.config.apisix.adminKey="81fBTS5^tjYMex" \
     --set admin.credentials.admin="81fBTS5^tjYMex" \
     --set admin.credentials.viewer="Izytx9YH&PX8S" \
     --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
     --set dashboard.enabled=true \
     --set dashboard.config.authentication.users[0].username=apisix \
     --set dashboard.config.authentication.users[0].password="k*7l0I7HSzZ#Y"
   ```
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] bzp2010 commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
bzp2010 commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101024340

   Hi, @lazychanger 
   
   Please try to go inside the container to test DNS resolution or view the upstream and route configuration created by ingress via APISIX dashboard.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101035112

   <img width="1414" alt="image" src="https://user-images.githubusercontent.com/20916944/163745206-c45f6e29-b416-4319-9738-353245ff1c11.png">
   <img width="1392" alt="image" src="https://user-images.githubusercontent.com/20916944/163745237-ade8320e-5c9c-4ca7-b1a2-1cf1ac1870f9.png">
   <img width="1619" alt="image" src="https://user-images.githubusercontent.com/20916944/163745265-d9b349ef-649a-460c-bb61-092cda1bb9e7.png">
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101064379

   嗯嗯,我理解了您的意思了,谢谢。
   
   可否理解为:在k8s中,`dashboard`应该只用于观察,而不用于配置。`route`、`upstream`、`plugin`等配置应当使用`apisix ingress controller` k8s api。
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101047339

   > For the APISIX Ingress controller, the ApisixRoute resource is namespace scoped. ApisixRoute resources and services should be in the same namespace.
   
   
   😂,`should be` are not `must be`.
   
   而且很容易存在跨命名空间的需求吧。`apisix`是一个`网关`,多项目共用一个`apisix`是存在可能的。
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger closed issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger closed issue #2424: How to configure DNS Discovery with Dashboard?
URL: https://github.com/apache/apisix-dashboard/issues/2424


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101033516

   > Hi, @lazychanger
   > 
   > Please try to go inside the container to test DNS resolution or view the upstream and route configuration created by ingress via APISIX dashboard.
   
   - 通过`service`容器内部是可以的。
   <img width="856" alt="image" src="https://user-images.githubusercontent.com/20916944/163744793-cd09ea40-6995-42a7-ac9e-c321f94168d4.png">
   
   
   - 通过 `kubectl create -f`的方式,上游内容如下。
   <img width="1045" alt="image" src="https://user-images.githubusercontent.com/20916944/163744663-50b4822b-8292-405a-93d9-0718c720a17b.png">
   
   - 通过`service clusterIP`也是可以访问。
   <img width="1230" alt="image" src="https://user-images.githubusercontent.com/20916944/163744944-003d29df-3eb7-4c77-b2ef-485b64762c21.png">
   <img width="1102" alt="image" src="https://user-images.githubusercontent.com/20916944/163744968-4fa2f5e4-daeb-41df-a668-c77e859e83c9.png">
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] tao12345666333 commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101042812

   For the APISIX Ingress controller, the ApisixRoute resource is namespace scoped. ApisixRoute resources and services should be in the same namespace.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] tao12345666333 commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101056081

   Note that I explicitly mentioned here the APISIX Ingress controller.
   
   > For the APISIX Ingress controller, the ApisixRoute resource is namespace scoped. ApisixRoute resources and services should be in the same namespace.
   
   This is the specific implementation of the APISIX Ingress controller project.
   
   
   
   
   > 而且很容易存在跨命名空间的需求吧。`apisix`是一个`网关`,多项目共用一个`apisix`是存在可能的。
   
   But if for Apache APISIX, it doesn't care what namespace the upstream service is in. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101116361

   非常感谢。
   
   😂但是`dashboard`配置DNS的问题还应该是缺陷吧。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] lazychanger commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
lazychanger commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101125106

   好的。那我关闭Issue呢


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] juzhiyuan commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101024677

   Hi @nic-chen, please have a quick look at this issue.
   
   If it's easy to fix (e.g., configuration error), then please point out what's the correct way.
   If you're not sure what happened, I will try to reproduce this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] tao12345666333 commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101095842

   > 嗯嗯,我理解了您的意思了,谢谢。
   > 
   > 
   > 
   > 可否理解为:在k8s中,`dashboard`应该只用于观察,而不用于配置。`route`、`upstream`、`plugin`等配置应当使用`apisix ingress controller` k8s api。
   > 
   > 
   > 
   > 
   > 
   > 
   
   Yes. Currently in the Kubernetes environment, if you use the APISIX Ingress controller, it is recommended that the dashboard be read-only


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-dashboard] tao12345666333 commented on issue #2424: How to configure DNS Discovery with Dashboard?

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #2424:
URL: https://github.com/apache/apisix-dashboard/issues/2424#issuecomment-1101119284

   If you use the APISIX dashboard for configuration, this has nothing to do with APISIX Ingress.  You need to check your configuration etc.
   
   See what other people have to say


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org