Yann Mulonda
1 min readApr 16, 2022

--

So they are two things here:

- in your Github action workflow, in the main.yml

This is the section that is supposed to recreate a fresh version of the app and change the page or site:

run: |

gcloud config set project ${{ secrets.GCP_PROJECT }}

gcloud config set compute/zone us-central1-c

gcloud container clusters get-credentials node-demo-k8s

kubectl apply -f deploy.yml

envsubst < deploy.yml

envsubst < deploy.yml | kubectl apply -f -

kubectl rollout status -w deployment/nodejs-demo-app

kubectl get all

But looks like it's not doing what we expect it to do coz you can see this on the Github actions logs:

deployment.apps/nodejs-demo-app unchanged

service/nodejs-demo-app-entrypoint unchanged

- Running kubectl apply seem to be fail to update or recreate your resources.

You can try to:

- Force replace, delete, and then re-create the resource.

but this will cause a service outage. because the app deployment and he service for the app entry point are in the same deploy.yml

so what I'd recommend you try doing is:

1. create a service.yml and move your kubernetes services there

2. add the kubernetes service deplyment in your workflow

3. change the code on the deploy_to_google_cloud section so that kubectl delete the kubectl delete and then kubectl apply -f deploy.yml

that's a work around, they might be a better to do it, so trying doing some additional research

--

--

Yann Mulonda
Yann Mulonda

Written by Yann Mulonda

Co-Founder & CIO @ITOT | DevOps | Senior Site Reliability Engineer @ICF󠁧󠁢󠁳󠁣󠁴 | "Learning is experience; everything else is just information!”

No responses yet