apisix-dashboard
apisix-dashboard copied to clipboard
Installing APISIX in kubesphere encountered etc, but could not find hosts
Issue description
{"level":"warn","ts":"2022-06-22T07:26:29.150Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-24379735-1c3f-4c87-8f75-853e81db5656/apisix-etcd:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial tcp: lookup apisix-etcd on 169.254.25.10:53: no such host\""}
2022-06-22T07:26:29.150Z ERROR storage/etcd.go:147 etcd get failed: context deadline exceeded
2022-06-22T07:26:29.150Z ERROR store/storehub.go:69 GenericStore init error: etcd get failed: context deadline exceeded
2022-06-22T07:26:29.150Z ERROR server/store.go:32 init stores fail: %!w(*errors.errorString=&{etcd get failed: context deadline exceeded})
2022-06-22T07:26:29.151Z ERROR cmd/root.go:99 The Manager API server start failed: etcd get failed: context deadline exceeded
Error: etcd get failed: context deadline exceeded
Usage:
manager-api [flags]
manager-api [command]
Available Commands:
help Help about any command
install re-install Apache APISIX Dashboard service
remove remove Apache APISIX Dashboard service
start start Apache APISIX Dashboard service
status inspect the status of Apache APISIX Dashboard service
stop stop Apache APISIX Dashboard service/program
version show manager-api version
Flags:
-c, --config string config file
-f, --force force start manager-api
-h, --help help for manager-api
-p, --work-dir string current work directory (default ".")
Use "manager-api [command] --help" for more information about a command.
etcd get failed: context deadline exceeded
Expected behavior
global:
imagePullSecrets: []
apisix:
enabled: true
customLuaSharedDicts: []
image:
repository: apache/apisix
pullPolicy: IfNotPresent
tag: 2.10.0-alpine
replicaCount: 1
podAnnotations: {}
podSecurityContext: {}
securityContext: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
podAntiAffinity:
enabled: false
nameOverride: ''
fullnameOverride: ''
gateway:
type: NodePort
externalTrafficPolicy: Cluster
http:
enabled: true
servicePort: 80
containerPort: 9080
tls:
enabled: false
servicePort: 443
containerPort: 9443
existingCASecret: ''
certCAFilename: ''
http2:
enabled: true
stream:
enabled: false
only: false
tcp: []
udp: []
ingress:
enabled: false
annotations: {}
hosts:
- host: apisix.local
paths: []
tls: []
admin:
enabled: true
type: ClusterIP
externalIPs: []
port: 9180
servicePort: 9180
cors: true
credentials:
admin: edd1c9f034335f136f87ad84b625c8f1
viewer: 4054f7cf07e344346cd3f287985e76a2
allow:
ipList:
- 127.0.0.1/24
plugins:
- api-breaker
- authz-keycloak
- basic-auth
- batch-requests
- consumer-restriction
- cors
- echo
- fault-injection
- grpc-transcode
- hmac-auth
- http-logger
- ip-restriction
- ua-restriction
- jwt-auth
- kafka-logger
- key-auth
- limit-conn
- limit-count
- limit-req
- node-status
- openid-connect
- authz-casbin
- prometheus
- proxy-cache
- proxy-mirror
- proxy-rewrite
- redirect
- referer-restriction
- request-id
- request-validation
- response-rewrite
- serverless-post-function
- serverless-pre-function
- sls-logger
- syslog
- tcp-logger
- udp-logger
- uri-blocker
- wolf-rbac
- zipkin
- traffic-split
- gzip
- real-ip
- server-info
stream_plugins:
- mqtt-proxy
- ip-restriction
- limit-conn
customPlugins:
enabled: false
luaPath: /opts/custom_plugins/?.lua
plugins:
- name: prometheus
attrs:
export_addr:
ip: 0.0.0.0
port: 9091
configMap:
name: prometheus
mounts:
- key: ''
path: ''
- key: ''
path: ''
dns:
resolvers:
- 127.0.0.1
- 172.20.0.10
- 114.114.114.114
- 223.5.5.5
- 1.1.1.1
- 8.8.8.8
validity: 30
timeout: 5
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
configurationSnippet:
main: ''
httpStart: ''
httpEnd: ''
httpSrv: ''
httpAdmin: ''
stream: ''
etcd:
enabled: true
host:
- 'http://etcd.host:2379'
prefix: /apisix
timeout: 30
auth:
rbac:
enabled: false
user: ''
password: ''
tls:
enabled: false
existingSecret: ''
certFilename: ''
certKeyFilename: ''
verify: true
service:
port: 2379
replicaCount: 3
dashboard:
enabled: true
service:
type: NodePort
ingress-controller:
enabled: true
config:
apisix:
serviceNamespace: zhlx-enpower
serviceMonitor:
enabled: true
namespace: ' zhlx-enpower'
interval: 15s
How to Reproduce
1、create apisix ,apisix dashboard ,apisix ingress controller in kubesphere form applocation template
2、docker start
Screenshots
No response
Environment
kubesphere
Additional context
No response
Hi, @renwayle.
Apparently there is a problem with the connection between dashboard and etcd, which prevents it from starting. You need to check the status of the etcd service (whether it is started correctly, whether the k8s service is configured correctly, whether coredns is responding correctly to its cluster domain resolution, etc.).
BTW, based on your DNS IP address 169.254.25.10, I'm guessing that you are using LocalDNS cache and you need to check if it is serving correctly.
if you use helm install, you need to set the dashboard's etcd config:
dashboard:
enabled: true
config:
conf:
etcd:
# Supports defining multiple etcd host addresses for an etcd cluster
endpoints:
- etcd.ingress-apisix.svc.cluster.local:2379
# apisix configurations prefix
prefix: "/apisix"
# Etcd basic auth info
username: ""
password: ""
if you use helm install, you need to set the dashboard's etcd config:
dashboard: enabled: true config: conf: etcd: # Supports defining multiple etcd host addresses for an etcd cluster endpoints: - etcd.ingress-apisix.svc.cluster.local:2379 # apisix configurations prefix prefix: "/apisix" # Etcd basic auth info username: "" password: ""
can privade all configs thanks [email protected]
docker run -d --name dashboard --network=docker-apisix_apisix
-p 9000:9000
-v <CONFIG_FILE>:/usr/local/apisix-dashboard/conf/conf.yaml
apache/apisix-dashboard
modify the CONFIG_FILE like this:
etcd: endpoints: # supports defining multiple etcd host addresses for an etcd cluster - etcd:2379