Currently I am practicing with Kubernetes resources like replicaSet , deployment and services. When I created my sample deployment and service for testing , I used kube apply
command for creating the deployment and service into the Kubernetes cluster.That is properly working.
Now I am trying to make a end-to-end deployment using CI/CD pipeline. So when I am adding the deployment step in the Jenkinsfile
, Can I use the kube apply
command inside Jenkinsfile. Means If I am continuously committing in my SVN repo , changes will get update by using kube apply
command? For each change I am making to repo need to reflect in deployment.
Can I use kube apply
command for update also in Kubernetes ? Or Do I need to use rollout
for updation of Kubernetes resource?
If I am continuously committing in my SVN repo , changes will get update by using kube apply command? Ans:Yes
Below is the definition from kube document
Apply is a command that will update a Kubernetes cluster to match state defined locally in files.
https://kubectl.docs.kubernetes.io/pages/app_management/apply.html