Comments (6)
Can you check the reason about why etcd apisix-etcd-0
not running ?
from apisix.
this is the guide from apisix
due to this error, I have reinstalled with this guide but all pods is not running
https://apisix.apache.org/blog/2021/12/15/deploy-apisix-in-kubernetes/
using kubectl describe pod pod_name --n namespace_name , I got this error
using kubectl logs pod_name --n namespace_name, I got this error
from apisix.
Can you check the reason about why etcd
apisix-etcd-0
not running ?
Could you please check the errors ? It is a little challenge from me. I hope you help me on this
from apisix.
Yes, the etcd cluster is not running normal.
So you can scale etcd replicas from 3 to 1 .
Or you can try preference etcd cluster config like this:
ETCD_ENABLE_V2: true
ALLOW_NONE_AUTHENTICATION: yes
ETCD_NAME: cooper-apisix-etcd-1 (v1:metadata.name)
POD_IP: (v1:status.podIP)
ETCD_ADVERTISE_CLIENT_URLS: http://$(POD_IP):2379
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://$(ETCD_NAME).cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_INITIAL_CLUSTER: cooper-apisix-etcd-0=http://cooper-apisix-etcd-0.cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380,cooper-apisix-etcd-1=http://cooper-apisix-etcd-1.cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380,cooper-apisix-etcd-2=http://cooper-apisix-etcd-2.cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380
ETCD_INITIAL_CLUSTER_TOKEN: apisix-etcd-cluster
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_DEBUG: true
from apisix.
ETCD_ADVERTISE_CLIENT_URLS
Yes, the etcd cluster is not running normal. So you can scale etcd replicas from 3 to 1 . Or you can try preference etcd cluster config like this:
ETCD_ENABLE_V2: true ALLOW_NONE_AUTHENTICATION: yes ETCD_NAME: cooper-apisix-etcd-1 (v1:metadata.name) POD_IP: (v1:status.podIP) ETCD_ADVERTISE_CLIENT_URLS: http://$(POD_IP):2379 ETCD_INITIAL_ADVERTISE_PEER_URLS: http://$(ETCD_NAME).cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380 ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380 ETCD_INITIAL_CLUSTER: cooper-apisix-etcd-0=http://cooper-apisix-etcd-0.cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380,cooper-apisix-etcd-1=http://cooper-apisix-etcd-1.cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380,cooper-apisix-etcd-2=http://cooper-apisix-etcd-2.cooper-apisix-etcd.paas-middleware-workspace-middleware.svc:2380 ETCD_INITIAL_CLUSTER_TOKEN: apisix-etcd-cluster ETCD_INITIAL_CLUSTER_STATE: new ETCD_DEBUG: true
Could you explain the difference between standard and your configuration ?
git clone https://github.com/zaunist/apisix-on-kubernetes.git
I have download the etcd.yaml and changed
- name: ETCD_ADVERTISE_CLIENT_URLS
value: >-
http://$(MY_POD_IP):2379
like this
for other configuration, I am not sure it works on my side
Because when I check ETCD_DEBUG and ETCD_ENABLE_V2, it didn't work
from apisix.
this is my pod yaml using kubectl edit command for the pod
but it seems different with your config
- name: etcd
image: docker.io/bitnami/etcd:3.5.7-debian-11-r14
ports:
- name: client
containerPort: 2379
protocol: TCP
- name: peer
containerPort: 2380
protocol: TCP
env:
- name: BITNAMI_DEBUG
value: 'false'
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: MY_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: MY_STS_NAME
value: apisix-etcd
- name: ETCDCTL_API
value: '3'
- name: ETCD_ON_K8S
value: 'yes'
- name: ETCD_START_FROM_SNAPSHOT
value: 'no'
- name: ETCD_DISASTER_RECOVERY
value: 'no'
- name: ETCD_NAME
value: $(MY_POD_NAME)
- name: ETCD_DATA_DIR
value: /bitnami/etcd/data
- name: ETCD_LOG_LEVEL
value: info
- name: ALLOW_NONE_AUTHENTICATION
value: 'yes'
- name: ETCD_AUTH_TOKEN
value: >-
jwt,priv-key=/opt/bitnami/etcd/certs/token/jwt-token.pem,sign-method=RS256,ttl=10m
- name: ETCD_ADVERTISE_CLIENT_URLS
value: >-
http://$(MY_POD_NAME).apisix-etcd-headless.api-gateway.svc.cluster.local:2379,http://apisix-etcd.api-gateway.svc.cluster.local:2379
- name: ETCD_LISTEN_CLIENT_URLS
value: http://0.0.0.0:2379
- name: ETCD_INITIAL_ADVERTISE_PEER_URLS
value: >-
http://$(MY_POD_NAME).apisix-etcd-headless.api-gateway.svc.cluster.local:2380
- name: ETCD_LISTEN_PEER_URLS
value: http://0.0.0.0:2380
- name: ETCD_INITIAL_CLUSTER_TOKEN
value: etcd-cluster-k8s
- name: ETCD_INITIAL_CLUSTER_STATE
value: new
- name: ETCD_INITIAL_CLUSTER
value: >-
apisix-etcd-0=http://apisix-etcd-0.apisix-etcd-headless.api-gateway.svc.cluster.local:2380,apisix-etcd-1=http://apisix-etcd-1.apisix-etcd-headless.api-gateway.svc.cluster.local:2380,apisix-etcd-2=http://apisix-etcd-2.apisix-etcd-headless.api-gateway.svc.cluster.local:2380
- name: ETCD_CLUSTER_DOMAIN
value: apisix-etcd-headless.api-gateway.svc.cluster.local
from apisix.
Related Issues (20)
- help request: Apisix ETCD going into Crash loop back off HOT 10
- feat: support environment variables in config-default.yaml HOT 3
- help request: What is the best way to dynamically route a cluster by token in customer plugin? HOT 3
- help request: proxy rewrite rule does not work HOT 2
- why the promethues metrics apisix_shared_dict_free_space_bytes{name="worker-events"} 0 HOT 2
- feat: As a user, I want to expand the weight in kubernetes service discovery
- bug: The command "apisix reload" sometimes causes the plugin's sock file to disappear HOT 2
- help request: want to know how to support sslv3 in apisix HOT 2
- help request: How to expose custom Prometheus metric with custom plugin
- The client secret for oidc plugin cannot be configured as environment variable
- bug: grpc-transcode plugin, in Protobuf, when there is a field of type int64, when 'a' is passed in, it is converted to 10. HOT 1
- bug: When I turn on kafka-logger and body-transformer at the same time, the response body conversion of body-transformer plugin will fail. HOT 1
- help request: Request for Assistance: Loki Logging Not Receiving Logs from Specific APIsix Route
- help request: 尝试代理 hdfs 的 webui,但是会返回 302 重定向,应该如何配置呢?或者是否有示例
- apisix will retry the post method? HOT 1
- bug: forward-auth does not return upstream headers to client HOT 1
- bug: http2 requests are not supported without content-length header HOT 2
- How to forward to upstream after successful authentication using the forward-auth plugin
- help request: missing user key in JWT token
- feat: support env var for secret config of plugins like kafka-logger, elasticsearch-logger
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apisix.