-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Description
I am unable to connect to etcd from apisix control plane on k8 deployment. Getting the error "request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused"
etcd is successfully deployed and available through endpoint : "http://etcd.apisix.svc.cluster.local:2379"
control plane config.yaml looks like below
deployment:
role: control_plane
role_control_plane:
config_provider: etcd
etcd:
host:
- "http://etcd.apisix.svc.cluster.local:2379"
prefix: /apisix
timeout: 30
config map for the config yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: apisix-config-control
namespace: apisix
data:
config.yaml: |
deployment:
role: control_plane
role_control_plane:
config_provider: etcd
etcd:
host:
- "http://etcd.apisix.svc.cluster.local:2379"
prefix: /apisix
timeout: 30
control plane deployment yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: apisix-control
namespace: apisix
spec:
replicas: 1
selector:
matchLabels:
app: apisix-control
template:
metadata:
labels:
app: apisix-control
spec:
containers:
- name: apisix
image: apache/apisix:latest
ports:
- containerPort: 9180
#command: [ "/bin/sh" ]
#args: [ "-c", "sleep infinity" ] # Keeps it running
volumeMounts:
- name: config
mountPath: /usr/local/apisix/conf/config.yaml
subPath: config.yaml
volumes:
- name: config
configMap:
name: apisix-config-control
defaultMode: 420
APISIX version - > Using docker image : apache/apisix:latest
Operating system ->. Docker desktop with kubernates on MAC M4
etcd version -> 3.5.10
Environment
- APISIX version (run
apisix version): - Operating system (run
uname -a): - OpenResty / Nginx version (run
openresty -Vornginx -V): - etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): - APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run
luarocks --version):
Metadata
Metadata
Assignees
Labels
Type
Projects
Status