From the course: Automating Kubernetes with GitOps

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Implementing the CD process

Implementing the CD process

- All right, so now that we have CI up and running, let's talk about CD. CD is a lot easier. Let's have a look at the operator that I created in order to do that. (keyboard clicks) So here's the gitop's prod operator and what do we see in the gitop's prod operator? Well, we see a lot of similarities, but it's a little bit easier. First, it has only one volume mount. It mounts a prod volume. We needed to, because a CI operator has written these files to the prod directory. So that's where I need to fetch these files. And how are we going to do that? Well, by running the find command, find on all YAML files, and that's going to kubectl apply all of these YAML files. Do notice that in this Git operator, I'm completely bypassing the prod directly as a Git repository. That's because the CI process hasn't updated the Git repository. It has just dumped the files in the appropriate directory. And if you ask me for what we need to do here, that's good enough. So let's run it and let's see how…

Contents