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/11/02 19:10:19 UTC
[GitHub] [apisix] vibbix opened a new issue, #8235: bug: Upstream's created by K8's do not show up until a matching route is added
vibbix opened a new issue, #8235:
URL: https://github.com/apache/apisix/issues/8235
### Current Behavior
When adding just an upstream/service to APISIX via Kubectl/kubernetes discovery, they are neither reflected in the UI until a route is created.
### Expected Behavior
The upstream should show up in the UI after it's created, even if there is no matching route. If this is intended behavior, it should be mentioned.
### Error Logs
2022-11-03T02:27:42+08:00 warn apisix/upstream.go:70 upstream not found {"name": "default_httpbin_80", "url": "http://apisix-admin.default.svc.cluster.local:9180/apisix/admin/upstreams/5ce57b8e", "cluster": "default"}
2022-11-03T02:27:42+08:00 warn ingress/controller.go:707 upstream is not referenced {"cluster": "name=default; base_url=http://apisix-admin.default.svc.cluster.local:9180/apisix/admin", "upstream": "default_httpbin_80"}
### Steps to Reproduce
1. Install apisix to default (with dashboard)
```yaml
#values.yaml
namespace: default
gateway:
type: NodePort
ingress-controller:
enabled: true
config:
apisix:
serviceNamespace: default
dashboard:
enabled: true
discovery:
enabled: true
kubernetes: { }
```
`helm install -f values.yaml apisix apisix/apisix`
2. Label the default namespace
`kubectl label namespace default apisix.ingress=watching`
3. Install http bin
`kubectl run httpbin --image kennethreitz/httpbin --port 80`
Apply this YAML file
```yaml
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
name: httpbin
spec:
retries: 3
```
4. View dashboard/access admin API
5. Apply this yaml
```yaml
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: httpbin-route
spec:
http:
- name: rule1
match:
hosts:
- httpbin.com
paths:
- /ip
backends:
- serviceName: httpbin
servicePort: 80
```
Correct entries now show up
![image](https://user-images.githubusercontent.com/1731900/199579296-f275a4ff-a8a2-4827-889b-ae3fcbfa2b16.png)
![image](https://user-images.githubusercontent.com/1731900/199579439-bc2ebc5a-7428-42e5-b93a-f2b1a7bb32fd.png)
### Environment
APISix Kubernetes Helm Chart v0.11.1
```
2022-11-03T02:27:23+08:00 info ingress/ingress.go:113 apisix ingress controller started
2022-11-03T02:27:23+08:00 info ingress/ingress.go:115 version:
Version: 1.5.0
Git SHA: no-git-module
Go Version: go1.19.2
Building OS/Arch: linux/amd64
Running OS/Arch: linux/amd64
```
```
bash-5.1# apisix version
/usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua version
2.15.0
bash-5.1#
```
--
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