I think by adding a initcontainers should fix this.
> initContainers:
> - name: init-apisix
> image: busybox:1.28
> command: ['sh', '-c', "until nslookup {{ .Release.Name
> }}-etcd-0.{{ .Release.Name }}-etcd.{{ .Release.Namespace }}.svc.{{
> .Values.gateway.k8s_domain }}; do echo waiting for etcd-0; sleep 2; done"]
>
>
Li Ling(Lien) <[email protected]> 于2020年10月10日周六 上午11:16写道:
> Hello, dev,
> recently I am working on installing APISIX via helm chart into K8S with
> etcd as dependent.
> Due to the mechanism of in-house DNS,after the etcd pod is ready,it
> would take some time (usually 5~10 seconds)before the internal domain can
> be correctly resolved.
>
> here comes two ideas to solve this problem:
> 1、add a *wait_etcd *phase before init_etcd, to check if the etcd is live
> or not.
> which means will need to change the code in /bin/apisix
> 2、change deployment.yaml of helm, add initContainers command to it.
>
> what do you think?
>
> [image: image.png]
> Thanks,
> Lien Li
>