Deploying containers via Kubernetes
Now it’s time to see our work pay off, and we can successfully use the cluster we’ve created. At this point, you should have either set up MicroK8s, or manually created a cluster as we’ve done in the previous section. In either case, the result is the same: we have a cluster available that we can use to deploy containers.
Keep in mind that if you’re using MicroK8s, you might need to prepend microk8s
in front of kubectl
commands, depending on how you set up MicroK8s. I’ll leave it up to you to add microk8s
to the front of such commands as you go along, if you’re using MicroK8s and you don’t have it set up to simplify microk8s kubectl
to kubectl
.
Kubernetes utilizes files created in the YAML format to receive instructions. Does that sound familiar? In Chapter 15, Automating Server Configuration with Ansible, we worked with YAML files as that’s the format that Ansible playbooks are written...