The vfarcic/go-demo-2 and mongo images form the same stack. They work together and having four YAML definitions is confusing. It would get even more confusing later on since we are going to add more objects to the stack. Things would be much simpler and easier if we would move all the objects we created thus far into a single YAML definition. Fortunately, that is very easy to accomplish.
Let's take a look at yet another YAML file:
cat svc/go-demo-2.yml
We won't display the output since it is the same as the contents of the previous four YAML files combined. The only difference is that each object definition is separated by three dashes (---).
If you're as paranoid as I am, you'd like to double check that everything works as expected, so let's create the objects defined in that file:
kubectl create -f svc...