You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "nphariharan (via GitHub)" <gi...@apache.org> on 2023/12/12 06:14:58 UTC
[I] request help: [apisix-ingress-controller]
nphariharan opened a new issue, #2097:
URL: https://github.com/apache/apisix-ingress-controller/issues/2097
### Issue description
Issue description
Not able to hit kubernetes local service using ApisixRoute and ApisixUpstream. Getting the below error.
Error message in Apisix logs : handle_upstream(): failed to set upstream: discovery kubernetes is uninitialized
Looks like some configuration I am missing related to kubernetes service discovery in apisix.
Thanks,
Hariharan.
Environment
your apisix-ingress-controller version (output of apisix-ingress-controller version --long): 1.6.0
your Kubernetes cluster version (output of kubectl version): 1.28.3
if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
etcd - docker.io/bitnami/etcd:3.5.7-debian-11-r14
Apisix version - apache/apisix:3.6.0-alpine
### Environment
- your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
- your Kubernetes cluster version (output of kubectl version):
- if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
--
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
Re: [I] request help: [apisix-ingress-controller]
Posted by "nphariharan (via GitHub)" <gi...@apache.org>.
nphariharan commented on issue #2097:
URL: https://github.com/apache/apisix-ingress-controller/issues/2097#issuecomment-1853568218
I followed this link for installation
https://apisix.apache.org/docs/ingress-controller/deployments/aws/
ADMIN_API_VERSION=v3
helm install apisix apisix/apisix \
--set gateway.type=LoadBalancer \
--set ingress-controller.enabled=true \
--create-namespace \
--namespace ingress-apisix \
--set ingress-controller.config.apisix.serviceNamespace=ingress-apisix \
--set ingress-controller.config.apisix.adminAPIVersion=$ADMIN_API_VERSION \
--set gateway.tls.enabled=true \
--set gateway.annotations."service\.beta\.kubernetes\.io/aws-load-balancer-type"=nlb
Post installation, the below pods are running fine in the namespace "ingress-apisix"
ingress-apisix apisix-54b6cc5b5d-6ps4h Running
ingress-apisix apisix-etcd-0 Running
ingress-apisix apisix-etcd-1 Running
ingress-apisix apisix-etcd-2 Running
ingress-apisix apisix-ingress-controller-598b5d56f4-wgz69 Running
--------------------------------------------
Below are my ApisixRoute & ApisixUpstream yaml files.
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: httpbin-internal-route
spec:
http:
- name: rule1
match:
hosts:
- internal.httpbin.org
paths:
- /*
upstreams:
- name: httpbin-internal-upstream
--------------------------------------------
apiVersion: apisix.apache.org/v2
kind: ApisixUpstream
metadata:
name: httpbin-internal-upstream
spec:
discovery:
type: dns
serviceName: httpbin.default.svc.cluster.local
--------------------------------------------
Also I have added below config in my apisix-configmap for dns discovery.
discovery:
dns:
servers:
- "172.20.0.10:53"
Please kindly help to resolve this issue.
Thanks,
Hariharan.
--
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
Re: [I] request help: [apisix-ingress-controller]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #2097:
URL: https://github.com/apache/apisix-ingress-controller/issues/2097#issuecomment-1851438413
@nphariharan Can you provide the installation steps you followed as well as your ApisixRoute and ApisixUpstream configuration?
--
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
Re: [I] request help: not able to hit kubernetes local service using ApisixRoute and ApisixUpstream [apisix-ingress-controller]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #2097:
URL: https://github.com/apache/apisix-ingress-controller/issues/2097#issuecomment-1876453987
@nphariharan The discovery intialization routine is run at startup and reads the configmap. It can not be changed later. So you will need to configure it with helm installation.
Use this configuration in values.yaml to override or use `--set` to set these fields during helm install.
```yaml
apisix:
discovery:
enabled: true
registry:
dns:
servers:
- "172.20.0.10:53"
```
I hope this solves your 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
Re: [I] request help: not able to hit kubernetes local service using ApisixRoute and ApisixUpstream [apisix-ingress-controller]
Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 closed issue #2097: request help: not able to hit kubernetes local service using ApisixRoute and ApisixUpstream
URL: https://github.com/apache/apisix-ingress-controller/issues/2097
--
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
Re: [I] request help: not able to hit kubernetes local service using ApisixRoute and ApisixUpstream [apisix-ingress-controller]
Posted by "nphariharan (via GitHub)" <gi...@apache.org>.
nphariharan commented on issue #2097:
URL: https://github.com/apache/apisix-ingress-controller/issues/2097#issuecomment-1891995537
Revolyssup - Thank you for your support
This is working fine now with the helm way of installation. (using the above configuration)
But how to add this Service discovery configuration, with yaml way of installation using below method?
https://apisix.apache.org/docs/ingress-controller/tutorials/the-hard-way/
Thanks,
Hariharan.
--
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