Release Notes
Announcements
Release Notes
kind: IngressapiVersion: v1metadata:annotations:ingress.cloud.tencent.com/direct-access: "true" ## Enable CLB-to-Pod direct access.ingress.cloud.tencent.com/enable-grace-shutdown: "true"` # It indicates the usage of graceful shutdown.name: my-Ingressspec:selector:app: MyApp...
preStop and terminationGracePeriodSecondspreStop and terminationGracePeriodSeconds in the workload that requires graceful shutdown.DeletionTimestamp and is in Terminating status, the weight of the Pod on the CLB backend is adjusted to 0.preStop hook is configured for the Pod, it will be executed.terminationGracePeriodSeconds (30s by default) elapses, a SIGKILL signal will be sent to forcibly stop it.preStoppreStop for the Pod to implement such logic as shown below:apiVersion: v1kind: Podmetadata:name: lifecycle-demospec:containers:- name: lifecycle-demo-containerimage: nginxlifecycle:preStop:exec:command:- /clean.sh
SIGTERM, and it will only keep the existing connections for processing, which may cause some requests to fail at the moment when the Pod is deleted.preStop to make the Pod sleep for a short while first and then start to stop the container processes after kube-proxy completes the rule sync as shown below:apiVersion: v1kind: Podmetadata:name: lifecycle-demospec:containers:- name: lifecycle-demo-containerimage: nginxlifecycle:preStop:exec:command:- sleep- 5s
terminationGracePeriodSeconds to adjust the termination grace periodpreStop and the business process termination may take more than 30s in total), you can customize terminationGracePeriodSeconds as shown below based on the actual situation so as to avoid being stopped by SIGKILL prematurely:apiVersion: v1kind: Podmetadata:name: grace-demospec:terminationGracePeriodSeconds: 60 # The termination grace period is 30s by default, and you can set a longer period.containers:- name: lifecycle-demo-containerimage: nginxlifecycle:preStop:exec:command:- sleep- 5s
0 only when a Pod is deleted. If a running Pod becomes unhealthy, setting the weight to 0 on the backend can reduce the risk of service unavailability.
You can use the ingress.cloud.tencent.com/enable-grace-shutdown-tkex: "true" annotation to implement graceful shutdown.
The annotation will check whether an endpoint in the Endpoint object is not-ready, and if so, the annotation will set the weight on the CLB backend to 0.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan