diff --git a/blog-balance.yaml b/blog-balance.yaml deleted file mode 100644 index 29092b1..0000000 --- a/blog-balance.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: blog-balancer - labels: - app: blog-balancer - -spec: - type: LoadBalancer - ports: - - name: blog-balancer - port: 80 - protocol: TCP - targetPort: 3000 - selector: - app: blog-dep - sessionAffinity: None diff --git a/blog-deploy.yaml b/blog-deploy.yaml index 227bead..48881a7 100644 --- a/blog-deploy.yaml +++ b/blog-deploy.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: blog-dep + namespace: blog labels: app: blog-dep spec: diff --git a/force_update.sh b/force_update.sh new file mode 100755 index 0000000..2d5799a --- /dev/null +++ b/force_update.sh @@ -0,0 +1,9 @@ +#! /bin/sh +# You can use this script to force kubernetes to update to the latest image +# Looking for a better way to do this... +DEPLOYMENT_NAME=blog-dep + +kubectl patch deployment $DEPLOYMENT_NAME -p \ + '{"spec":{"template":{"spec":{"terminationGracePeriodSeconds":30}}}}' -n blog +kubectl patch deployment $DEPLOYMENT_NAME -p \ + '{"spec":{"template":{"spec":{"terminationGracePeriodSeconds":60}}}}' -n blog