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'll need to prepend microk8s
in front of kubectl
commands. 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.
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 in. YAML isn't specific to Ansible; it's used with many different applications and services, and Kubernetes...