Closed adam-qin closed 2 years ago
Our logs as follows:
2022-05-13T02:15:22.198Z [DEBUG] to-consul/sink: [watchReapableServices] services returned from catalog: services=["{ customer-relationship-server}", "{ payment-server}", "{ product-server}", "{ finance-info-server}", "{ message-server}", "{ user-admin-server}", "{ config-manager}", "{ stock-order-server}", "{ t2-server}", "{ template-server}", "{ user-server}", "{ option-order-server}", "{ asset-center-server}", "{ config-manager-admin}", "{ jy-ipo-server}", "{ stock-capital-server}", "{ stock-entrust-server}", "{ verification-code-server}", "{ aggregation-server}", "{ jy-sentinel-dashboard}", "{ admin-server}", "{ xxl-job}", "{ gateway-server}", "{ user-oversea-server}", "{ gateway-server-open}", "{ gateway-server-inner}", "{ jy-gateway-server-open}", "{ user-account-server}", "{ finance-server}", "{ php-apache}", "{ community-platform}", "{ statement-server}", "{ activity-server}", "{ data-server}", "{ customer-serving-server}", "{ gateway-server-activity}"]
2022-05-13T02:15:26.013Z [DEBUG] to-consul/source.controller/endpoints: queue: op=update key=jy-hk-system/php-apache
2022-05-13T02:15:26.013Z [DEBUG] to-consul/source.controller/endpoints: processing object: key=jy-hk-system/php-apache exists=true
2022-05-13T02:15:26.013Z [DEBUG] to-consul/source: [generateRegistrations] generating registration: key=jy-hk-system/php-apache
2022-05-13T02:15:26.013Z [DEBUG] to-consul/source: generated registration: key=jy-hk-system/php-apache service=php-apache namespace= instances=1
2022-05-13T02:15:36.774Z [DEBUG] to-consul/sink: registered service instance: node-name=k8s-sync service-name=php-apache consul-namespace-name= service="&{ php-apache-ce2b0e057289 php-apache [k8s] map[external-k8s-ns:jy-hk-system external-source:kubernetes port-:80] 80 10.66.80.120 map[] {0 0} false 0 0
Hey @adam-qin !!
Updating to a newer version of consul-k8s will ensure compatibility with newer Kubernetes versions! It has been validated against Kubernetes 1.20. We have dropped support for 1.15 on the newer consul-k8s version though.
@thisisnotashwin I have kept consul-k8s updated , but problem still exists with our product consul cluster , and not exist with a new test consul standalone server , i'm confused. Another question is if we use more than one consul-k8s sync process , is there any side effect for service registration and deregistration as I saw in the code, scheduleReapService should held a lock before scheduled . thanks a lot.
@adam-qin We do have leader election setup with the controllers so even if you run multiple instances, the workload is managed by a single process and the other instance will only work if the first one goes down. How many services do you have running in the cluster where you are seeing a delay in performance? Workload wise, it there a difference in the 2 clusters?
@thisisnotashwin thanks for your reply. We have 57 services with 121 pods, that amount of service wouldn't face the problem in our k8s 1.15.6 cluster . There is another problem i found, consu-k8s's parameter consul-node-name doesn't support dot, which would be a problem as all the domain would contains dot , for example k8s-sync.abc.com would be incorrect when config with consu-k8s
@thisisnotashwin my config as follows:
As stated previously, please upgrade to the latest version of Consul K8s are we no longer support 0.25.0.
We have used consul-k8s:v0.25.0 on Kubernetes 1.15 and everything works fine, but when we move to Amazon EKS 1.20 , consul-k8s v0.25.0 seems something wrong, which is when the service endpoint updated ,and the endpoint slice delay about 1 minutes to be synced to consul , including ep online and offline. Hope to have some advice, shall we need to update consul-k8s to v0.42.0 or later ?