This course explores how to build microservices in Go and deploy them on Kubernetes to create reusable components that can be fully managed in the cloud. We'll talk about what a microservice is and its overall architecture. We'll then take a look at the Go programming language, its benefits, and why it works well for building microservices.
You'll also get an intro to Kubernetes including what it is, what it is used for, and the key components that are needed to get a microservice from code to be exposed on the internet.
We'll then combine these three services to do an example use case where we'll build a microservice in Go and deploy it on Kubernetes. Finally, we'll look at CI/CD integration with GitHub and Google Cloud and how you can automate your deployments.
- Learn about microservices and their overall architecture
- Learn about the Go programming language and why it's good for building microservices
- Understand how Kubernetes can be used to deploy microservices
- Learn about CI/CD with GitHub and Google Cloud
This course is intended for engineers throughout the tech stack or anyone who wants to get their feet wet in DevOps and learn how programs can be managed in the cloud.
There are no essential prerequisites for this course. However, we recommend that you have:
- Experience with at least one high-level programming language, whether that be Java, Python, or Ruby
- A conceptual understanding of Linux containers and/or Docker
Now that you've decided to use Go, for your next microservice application, let's talk about how we can manage it using Kubernetes. If you head over to the Kubernetes homepage it defines itself as an open source system for automating deployment, scaling and management of containerized applications.
So what can Kubernetes provide for you? Orchestration, this is the management part of Kubernetes. It will manage all of the containers, deployments and communication for you, amongst other things. It will also handle networking for you, giving you access to all IP addresses and internal DNS resolution. It's also great at handling cloud infrastructure for you. Removing a lot of these barriers that you'll need to expose your application to the internet.
Kubernetes provides high availability. If a service or container decides to crash for whatever reason, it will automatically spin up a new one for you. If you are deploying an update, Kubernetes will deploy the new version and ensure that it is in working condition, before bringing down the other containers that it's managing. You will always have at least one running service, so your updates are seamless for your users.
Finally, Kubernetes is managed by YAML files, this gives you the ability to version control your infrastructure, and this is exactly what DevOps is all about.
Infrastructure as code. One of the questions I get asked a lot is, what is the difference between Kubernetes and Docker. And I think it's important that we cover this in case there's still a little bit of confusion. It's also a little bit hard to answer the question, because Kubernetes and Docker can't be compared directly.
The reason for this is that Kubernetes focuses on orchestration of containers and doesn't actually worry about the build process. Docker focuses on building and containerize applications. If you've ever worked with Docker Compose before, you can think of Kubernetes like Docker Compose, but on a much, much more powerful scale and a lot more flexible.
All the examples used throughout this course will be using the Google Kubernetes Engine within Google Cloud. The reason for this choice is that it's an industry standard and if you're unfamiliar with Kubernetes or its history, Kubernetes was actually originally crafted at Google under the name, Project Borg. Kubernetes is actually the open source version of this project.
It has a lot of powerful integrations and it works really well together with the other service Google Cloud provides. It can easily be managed from the web console in Google Cloud, or it can be done through the command line. If your infrastructure is not on Google Cloud, no need to worry.
There are a bunch of other alternatives you can choose from, the most common alternatives being AWS EKS or the Elastic Kubernetes Service. There's the AKS or Azure Kubernetes Service and the DigitalOcean Managed Kubernetes. So if your cloud infrastructure is not on GCP, then please do check out the other services that are available.
Calculated Systems was founded by experts in Hadoop, Google Cloud and AWS. Calculated Systems enables code-free capture, mapping and transformation of data in the cloud based on Apache NiFi, an open source project originally developed within the NSA. Calculated Systems accelerates time to market for new innovations while maintaining data integrity. With cloud automation tools, deep industry expertise, and experience productionalizing workloads development cycles are cut down to a fraction of their normal time. The ability to quickly develop large scale data ingestion and processing decreases the risk companies face in long development cycles. Calculated Systems is one of the industry leaders in Big Data transformation and education of these complex technologies.