From f8d964f8d2a68162a2832fa3b69fdffa8078d47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Tue, 6 Aug 2019 12:44:57 +0200 Subject: [PATCH] Bump the api version for the Deployment resource to apps/v1 It was previously set to extensions/v1beta1. I have discovered that when the Deployment is created as a extensions/v1beta1, it causes the existing pod to be killed immediately when doing a rolling update. When the Deployment was created as apps/v1, a rolling update behaves as expected: a new pod is created, and the old one is only terminated once the new pod is ready to serve traffic. The existing Deployment resource will need to be deleted and recreated: kubectl delete deployment gitea-server kubectl apply -f gitea-server.yaml Applying the file without deleting it first will not fix the issue with rolling updates. It will cause a short downtime --- kubernetes/gitea-server.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kubernetes/gitea-server.yaml b/kubernetes/gitea-server.yaml index a47fc3f..4208186 100644 --- a/kubernetes/gitea-server.yaml +++ b/kubernetes/gitea-server.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: gitea-server @@ -6,6 +6,9 @@ metadata: app: gitea spec: replicas: 1 + selector: + matchLabels: + app: gitea template: metadata: labels: -- 2.25.1