10 Activate Deployment Action
- Copy
k8s-deploy.yml
to the workflows folder and commit and push when that is done, by running the command
cp k8s-deploy.yml ../.github/workflows
- Open github.com -> Actions and see your action run successfull.
- To see your deployment and service beging deployed run
kubectl get all -n studentx
- Note the age of the deployments.
NAME READY STATUS RESTARTS AGE
pod/studentx-deployment-648bffc4c7-lf4dg 1/1 Running 0 24s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/nginx-service NodePort 10.152.183.128 <none> 80:30010/TCP 23s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/studentx-deployment 1/1 1 1 24s
NAME DESIRED CURRENT READY AGE
replicaset.apps/studentx-deployment-648bffc4c7 1 1 1 24s
If everything went as planned, you will now have 2 working pipelines (Actions) that creates ad pushes a container on chage, and one that deployes it as a K8S app.
In the real work, there would be more steps, and the flow might be a bit different.
In class, talk about :
- How to improve it ?
- tools to use ?
- idempotent
- Splitting CI / CD
- Security
- etc.