some k8s stuff

This commit is contained in:
John Doe 2023-02-13 18:13:10 -05:00
parent 43535c3e2c
commit b2df8f5895
3 changed files with 10 additions and 17 deletions

View File

@ -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

View File

@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: blog-dep
namespace: blog
labels:
app: blog-dep
spec:

9
force_update.sh Executable file
View File

@ -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