Chapter 5. Container Management with Terraform
This chapter explores the application of Terraform in managing containers, which are instrumental in the modern paradigm of developing, packaging, and deploying applications to ensure consistency across diverse environments. Terraform engages with renowned container orchestration platforms such as Kubernetes and Docker via its provider plug-ins. These plug-ins extend Terraform’s capabilities, enabling the management of resources within these orchestration platforms.
The interaction between Terraform and these platforms allows for the automation of provisioning and managing containerized applications and the infrastructure they operate on. For instance, with the Kubernetes provider, Terraform can manage resources such as Pods, services, and others, while the Docker provider enables the management of Docker images and containers.
Utilizing Terraform for container management streamlines the infrastructure development process, bringing about benefits akin to application code management, such as version control, peer review, and automated testing. Whether orchestrating Docker containers or administrating a Kubernetes cluster, Terraform offers a coherent and scalable approach to managing containerized applications, aligning infrastructure management with modern development practices.
5.1 Using Local Versus Remote Docker Images
Problem
You have Docker images both locally and in a remote Docker registry, and you need to decide when to use ...
Get Terraform Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.