Skip to content

help request: Unable to connect to etcd from apisix control plane on k8 deployment #12136

@hebbaa

Description

@hebbaa

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 -V or nginx -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

No one assigned

    Labels

    questionlabel for questions asked by users

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions