Tutorials
At IT Wonder Lab we share best practices and tutorials for the deployment of applications and the management of cloud infrastructures.
- Docker & Rancher Desktop Tutorials
Docker and Rancher Desktop Troubleshooting: Common Errors and Fixes
Fix common Docker and Rancher Desktop problems: daemon not reachable, ports below 1024, KVM, missing images after switching engines, ImagePullBackOff, disk space.
- Docker & Rancher Desktop Tutorials
Automate Rancher Desktop with rdctl: Settings, Snapshots and Profiles
Use rdctl, the Rancher Desktop command line, to start the app, change engine and Kubernetes, take snapshots, install extensions and create deployment profiles.
- Docker & Rancher Desktop Tutorials
Terraform Docker Provider: Manage Containers and Images as Code
Use the Terraform and OpenTofu Docker provider (kreuzwerker/docker) with Rancher Desktop to manage images, networks, volumes and containers declaratively.
- Docker & Rancher Desktop Tutorials
Push Docker Images from Rancher Desktop to Amazon ECR
Create an Amazon ECR repository with Terraform, log in with the AWS CLI and push images built in Rancher Desktop with docker or nerdctl, for ECS and EKS.
- Docker & Rancher Desktop Tutorials
Convert Docker Compose to Kubernetes: Kompose and Manual Migration
Migrate a Docker Compose app to Kubernetes: generate manifests with Kompose, fix what it cannot convert and deploy to Rancher Desktop with Secrets and Ingress.
- Docker & Rancher Desktop Tutorials
Kubernetes in Rancher Desktop: Run Your Local Images on K3s
Use the Kubernetes cluster of Rancher Desktop: choose the version, run local images without a registry, expose apps with Traefik ingress and port-forward.
- Docker & Rancher Desktop Tutorials
Docker Image Security: Scan with Trivy and Harden Your Containers
Secure Docker images and containers: scan for vulnerabilities with Trivy or Docker Scout, pin base images, run as non-root, read-only, drop capabilities, manage secrets.
- Docker & Rancher Desktop Tutorials
Docker BuildKit and buildx: Cache Mounts, Secrets and Multi-Platform Images
Speed up Docker builds with BuildKit cache mounts, use build secrets safely and build multi-platform images (amd64 and arm64) with buildx and Rancher Desktop.
- Docker & Rancher Desktop Tutorials
Docker Compose Watch: Live Reload for Containers in Development
Use docker compose watch to sync code into running containers, rebuild on dependency changes and restart on config changes, with Node.js and Python examples.
- Docker & Rancher Desktop Tutorials
Docker Compose Tutorial: Run Multi-Container Apps with One File
Learn Docker Compose with a real stack: a Node.js app, PostgreSQL and Redis with healthchecks, volumes, environment files, profiles and the everyday commands.
- Docker & Rancher Desktop Tutorials
Docker Networking Explained: Bridge Networks, Ports and DNS
How Docker networking works: the default bridge, user-defined networks with DNS, publishing ports, host and none drivers, and how to debug connectivity.
- Docker & Rancher Desktop Tutorials
Docker Volumes and Bind Mounts: Persist Data in Containers
Learn Docker volumes, bind mounts and tmpfs: how to persist a PostgreSQL database, back it up, share files with the host and avoid the common permission problems.
- Docker & Rancher Desktop Tutorials
Docker Multi-Stage Builds: Smaller and More Secure Images
Use Docker multi-stage builds to separate the build from the runtime: examples in Go and Node.js, build targets, distroless images and non-root users.
- Docker & Rancher Desktop Tutorials
Dockerfile Tutorial: Build Your First Docker Image Step by Step
Learn to write a Dockerfile: FROM, COPY, RUN, CMD and ENTRYPOINT, the build cache, .dockerignore and best practices, building a real Node.js image.
- Docker & Rancher Desktop Tutorials
Docker CLI Commands Cheat Sheet: The Commands You Use Every Day
A practical Docker CLI cheat sheet: run, ps, logs, exec, build, images, volumes, networks, inspect and cleanup commands with examples that also work with nerdctl.
- Docker & Rancher Desktop Tutorials
Rancher Desktop: containerd vs dockerd, nerdctl vs Docker CLI
Choose the container engine of Rancher Desktop: containerd with nerdctl or dockerd with the docker CLI. Compare them, switch safely and compare with Docker Desktop.
- Docker & Rancher Desktop Tutorials
How to Install Rancher Desktop on Linux, macOS and Windows
Install Rancher Desktop, the free Docker Desktop alternative, on Linux, macOS and Windows, pick the container engine and run your first container and cluster.
- Docker & Rancher Desktop Tutorials
Docker Basics: Containers, Images and Registries Explained
Understand what Docker is: containers vs virtual machines, image layers, registries and the Docker architecture, with your first commands step by step.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform CI/CD (21)
Automate Terraform and OpenTofu on AWS with GitHub Actions: checks on every pull request, plan comments, approved applies and OIDC without keys.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Tools (20)
The essential tools for Terraform and OpenTofu: fmt, validate, TFLint, Trivy, Checkov, terraform-docs, Infracost and pre-commit hooks.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Backends (19)
Store the Terraform or OpenTofu state in an encrypted, versioned S3 bucket with native state locking, and migrate the local state to it.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Modules (18)
Refactor the AWS network of the tutorial into a reusable Terraform module with variables and outputs, without recreating any resource.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Load Balancers (16)
Use Terraform to create an Application Load Balancer with a target group, listeners and HTTPS in front of an Auto Scaling group on AWS.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Auto Scaling (15)
Use the Terraform aws_launch_template and aws_autoscaling_group resources to run a self-healing, scalable group of EC2 instances on AWS.
- Terraform & OpenTofu Tutorials
Estimate AWS Costs in Terraform Pull Requests with Infracost
How to see the monthly cost of Terraform and OpenTofu changes before applying them with Infracost, and how to keep AWS demo costs under control.
- Docker & Rancher Desktop Tutorials
Install Redis with Docker: Persistence, Basic Commands and Caching
Run Redis in a container with a persistent volume and a password, learn the essential commands, key expiration and the cache-aside pattern, and check memory usage.
- Docker & Rancher Desktop Tutorials
Install Prometheus with Docker: Scrape Metrics and Write PromQL Queries
Run Prometheus in a container, scrape a Node Exporter and your own targets, learn the basic PromQL queries and create an alert rule you can test locally.
- Kubernetes Tutorials
Kubernetes ConfigMaps and Secrets: Environment Variables, Files and Best Practices
Create ConfigMaps and Secrets, inject them as environment variables or mounted files, update them safely, protect secrets and fix the common errors.
- Docker & Rancher Desktop Tutorials
Install NGINX with Docker: Web Server, Reverse Proxy and HTTPS
Run NGINX in a container to serve a static site, proxy requests to an application, balance load between replicas and add TLS, with the configuration explained.
- Docker & Rancher Desktop Tutorials
Install PostgreSQL with Docker: Persistent Data, psql and Backups
Run PostgreSQL in a container with a persistent volume, create a database and a user with psql, initialize it with SQL scripts and back up and restore it.
- Ansible Tutorials
Install Vagrant and VirtualBox: Create Local Virtual Machines as Code
Install VirtualBox and Vagrant, write a Vagrantfile for a multi-VM lab with private networking and provisioning, and use the daily commands to manage it.
- Docker & Rancher Desktop Tutorials
Install MariaDB or MySQL with Docker: Users, Volumes and Backups
Run MariaDB (or MySQL) in a container with a persistent volume, create databases and users, load initial SQL, back up with mariadb-dump and connect from your apps.
- Terraform & OpenTofu Tutorials
AWS VPC Peering and Transit Gateway with Terraform
Connect AWS VPCs with Terraform or OpenTofu using VPC peering for simple cases or a Transit Gateway for many networks, with routes and a comparison of costs.
- Kubernetes Tutorials
Kubernetes Persistent Volumes, PVC and StorageClass: Complete Guide
Keep data across pod restarts with PersistentVolumes, PersistentVolumeClaims, StorageClasses and StatefulSets: access modes, resizing, backups and troubleshooting.
- AWS Tutorials
Build an AWS AMI with Packer and Use It in Terraform
Install Packer, build a custom Ubuntu AMI with a shell provisioner, tag it and look it up in Terraform to launch EC2 instances that boot ready to serve.
- Terraform & OpenTofu Tutorials
What is OpenTofu? The Open-Source Fork of Terraform Explained
OpenTofu is the open-source Infrastructure as Code tool, a fork of Terraform managed by the Linux Foundation. Learn what it is, how it works and how to start.
- Terraform & OpenTofu Tutorials
Terraform lifecycle: prevent_destroy, create_before_destroy, ignore_changes
How to use the Terraform and OpenTofu lifecycle block: prevent_destroy, create_before_destroy, ignore_changes, replace_triggered_by and conditions.
- Terraform & OpenTofu Tutorials
Install HashiCorp Vault with Docker: Secrets, Policies and Terraform
Run Vault in dev mode, store secrets in the KV engine, restrict access with policies and tokens, and read them from the CLI, curl and Terraform.
- Terraform & OpenTofu Tutorials
Regex in Terraform, Ansible and Prometheus: Functions, Filters and Matchers
Use regular expressions in Terraform regex(), regexall() and replace(), in variable validation, in Ansible regex_search and lineinfile, and in Prometheus label matchers.
- DevOps Tutorials
Cron Expressions with Examples: crontab, Kubernetes CronJob, GitHub Actions and EventBridge
Learn to read and write cron expressions with examples, set up crontab safely with logs and locks, and reuse the syntax in Kubernetes, GitHub Actions and AWS.
- Ansible Tutorials
Install Ansible and Write Your First Playbook: Inventory, Modules and Roles
Install Ansible with pipx, define an inventory, run ad hoc commands, write an idempotent playbook with variables, handlers and templates, and organize it in a role.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu on Oracle Cloud (OCI): Getting Started with the OCI Provider
Deploy your first resources on Oracle Cloud (OCI) with Terraform or OpenTofu: API key authentication, a VCN, a compute instance and an Object Storage bucket.
- Terraform & OpenTofu Tutorials
Terraform import, moved and removed Blocks: Refactor Without Destroying
How to import existing AWS resources into Terraform or OpenTofu, rename them with moved blocks and stop managing them with removed blocks, without downtime.
- Kubernetes Tutorials
kubectl Cheat Sheet: Install and Essential Commands for Kubernetes
Install kubectl, manage contexts and namespaces and use the commands you need every day to create, inspect, debug, scale and delete Kubernetes resources.
- AWS Tutorials
jq Cheat Sheet: Process AWS CLI and kubectl JSON Output
Install jq and learn the filters you need for AWS CLI and kubectl JSON: select fields, filter arrays, build new objects, group, count and use shell variables.
- Kubernetes Tutorials
Create a Local Kubernetes Cluster with kind: Multi-Node, Ingress and Local Images
Install kind, create a multi-node Kubernetes cluster in Docker with port mappings, deploy an app, load local images without a registry and delete the cluster.
- Terraform & OpenTofu Tutorials
Terraform -replace, taint and -target: Recreate or Limit Resources Safely
How to force Terraform and OpenTofu to recreate a resource with -replace (the replacement for taint), when to use -target and how to avoid its risks.
- Terraform & OpenTofu Tutorials
Terraform vs OpenTofu: Differences, License and Which One to Choose
Compare Terraform and OpenTofu: license, governance, compatibility, exclusive features such as state encryption, and how to decide which one to use.
- Kubernetes Tutorials
Kubernetes Pods and Deployments: Replicas, Rolling Updates and Rollbacks
Learn what a Pod, ReplicaSet and Deployment are, write a manifest, scale, update with zero downtime, roll back and fix the common errors, with an FAQ.
- Docker & Rancher Desktop Tutorials
Install Traefik with Docker: Reverse Proxy with Automatic Routing
Run Traefik v3 with Docker Compose, route several containers by hostname with labels, add the dashboard, middlewares and automatic Let's Encrypt certificates.
- DevOps Tutorials
rsync Tutorial: Copy, Sync and Back Up Files over SSH with Incremental Snapshots
Learn rsync with examples: copy and mirror folders, trailing slashes, excludes, SSH sync, dry runs, bandwidth limits and incremental backups with hard links.
- Docker & Rancher Desktop Tutorials
Install Podman on Linux: Rootless Containers as a Docker Alternative
Install Podman, run rootless containers, build images, use pods and volumes, create systemd services and move from Docker with the same commands.
- Kubernetes Tutorials
Kubernetes Overlays with Kustomize: One Base, Many Environments
Use Kustomize with kubectl to keep one set of manifests and patch them per environment: namespaces, replicas, images, ConfigMaps and strategic merge patches.
- Kubernetes Tutorials
Kubernetes Pod Stuck in Pending: Causes, Debugging and Fixes
Why a Kubernetes pod stays Pending: insufficient CPU or memory, taints, node selectors, unbound PVCs, quotas and zones. How to read FailedScheduling and fix it.
- Terraform & OpenTofu Tutorials
Terraform Variables, Outputs and Locals Explained with Examples
How to use input variables, validation, outputs and local values in Terraform and OpenTofu, and how to set variables with tfvars files and environment variables.
- Terraform & OpenTofu Tutorials
AWS IAM Roles and Policies with Terraform and OpenTofu
How to create IAM roles, policies, instance profiles and assume-role trust relationships with Terraform or OpenTofu, following least privilege, with AWS examples.
- AWS Tutorials
Test Terraform Locally with LocalStack: S3, SQS and DynamoDB Without an AWS Account
Run LocalStack in Docker, point the AWS CLI and the Terraform AWS provider to it and create S3, SQS and DynamoDB resources locally for free, fast tests.
- Kubernetes Tutorials
Kubernetes Probes and Resource Limits: Liveness, Readiness, Requests and OOMKilled
Configure liveness, readiness and startup probes and CPU and memory requests and limits, understand QoS and OOMKilled, and debug restarts and throttling.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu with GitHub Actions and AWS OIDC (No Access Keys)
Run Terraform or OpenTofu plan on pull requests and apply on merge with GitHub Actions, authenticating to AWS with OIDC and short-lived credentials.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu Cheat Sheet: Commands and HCL Syntax
A quick reference of the most used Terraform and OpenTofu commands (init, plan, apply, state, import, workspace) and HCL syntax, with examples to copy.
- Terraform & OpenTofu Tutorials
Install Git and Create Your First Repository: Commits, Branches and Remotes
Install and configure Git, create a repository, make commits, work with branches and pull requests, connect to GitHub with SSH and avoid committing secrets.
- Terraform & OpenTofu Tutorials
AWS S3 Buckets with Terraform and OpenTofu: Secure Configuration
Create secure AWS S3 buckets with Terraform or OpenTofu: public access block, encryption with KMS, versioning, lifecycle rules and bucket policies.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu on OpenStack: Getting Started with the OpenStack Provider
Deploy your first resources on OpenStack with Terraform or OpenTofu: clouds.yaml authentication, a network and router, an instance and a floating IP.
- Terraform & OpenTofu Tutorials
terraform-aws-modules: Create a VPC and EKS Cluster with the Official Community Modules
How to use the popular terraform-aws-modules (vpc, iam, s3-bucket, eks) from the Terraform and OpenTofu registry: versions, inputs, outputs and a VPC plus EKS example.
- Docker & Rancher Desktop Tutorials
Install Grafana with Docker and Build Your First Dashboard
Run Grafana in a container with a persistent volume, connect Prometheus as a data source, provision it from files and build your first dashboard step by step.
- DevOps Tutorials
Regular Expressions Tutorial with Examples: grep, sed, Python and Cheat Sheet
Learn regex from zero with runnable examples: character classes, quantifiers, groups, anchors, greedy vs lazy matching, and patterns for IPs, versions, ARNs and logs.
- Kubernetes Tutorials
Kubernetes Services and Ingress: ClusterIP, NodePort, LoadBalancer and Routing
Expose Kubernetes apps: ClusterIP, NodePort and LoadBalancer Services, Ingress with host and path routing and TLS, DNS, plus common errors and how to debug them.
- Terraform & OpenTofu Tutorials
Terraform Multi-Region and Multi-Account AWS with Provider Aliases
How to deploy to several AWS regions and accounts from one Terraform or OpenTofu configuration using provider aliases, assume_role, modules and for_each on providers.
- Terraform & OpenTofu Tutorials
AWS Lambda and API Gateway with Terraform: Serverless HTTP API
Deploy a serverless HTTP API with an AWS Lambda function, IAM role, CloudWatch logs and API Gateway HTTP API using Terraform or OpenTofu.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu Testing: tofu test, validate and Terratest
How to test infrastructure code: terraform validate, the native terraform test and tofu test framework with mock providers, plan checks and Terratest.
- Kubernetes Tutorials
Kubernetes Architecture Explained: Control Plane, Nodes and Components
How Kubernetes works: API server, etcd, scheduler, controller manager, kubelet, kube-proxy and the container runtime, with what happens when you run kubectl apply.
- Terraform & OpenTofu Tutorials
AWS SQS and SNS with Terraform: Queues, Topics and Dead-Letter Queues
Create AWS SQS queues with dead-letter queues, SNS topics and subscriptions with Terraform or OpenTofu, including encryption and the access policy for fan-out.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu Project Structure: Recommended Layouts
How to organize a Terraform or OpenTofu project: files, modules, environments, state splitting, versions and a monorepo layout that scales with the team.
- Kubernetes Tutorials
Kubernetes Horizontal Pod Autoscaler (HPA): CPU, Memory and Custom Metrics
Scale a Deployment automatically with the Horizontal Pod Autoscaler: install metrics-server, set targets, tune scaling behavior, load test and fix HPA errors.
- Terraform & OpenTofu Tutorials
Common Terraform and OpenTofu Errors and How to Fix Them
Fix the most common Terraform errors: state lock, provider version, cycle, invalid count, already exists, access denied, credentials and failed apply on AWS.
- Terraform & OpenTofu Tutorials
AWS VPC Endpoints and PrivateLink with Terraform: Private Access to AWS Services
Create gateway and interface VPC endpoints with Terraform or OpenTofu to reach S3, DynamoDB and other AWS services privately and reduce NAT gateway costs.
- Terraform & OpenTofu Tutorials
Terraform Secrets Management: Keep Passwords Out of Code and State
How to handle secrets in Terraform and OpenTofu: sensitive variables, AWS Secrets Manager, SSM, generated passwords, ephemeral values and state encryption.
- Kubernetes Tutorials
Kubernetes CrashLoopBackOff: Causes, How to Debug and How to Fix It
Why a Kubernetes pod is in CrashLoopBackOff and how to fix it: read the previous logs, exit codes, OOMKilled, bad probes, missing config, wrong command and dependencies.
- Terraform & OpenTofu Tutorials
Automate AWS with EventBridge Scheduler and Lambda: Stop and Start EC2 on a Schedule (Terraform)
Automate AWS tasks with Terraform: schedule a Lambda function with EventBridge Scheduler to stop and start tagged EC2 instances and save costs outside working hours.
- Kubernetes Tutorials
Kubernetes Namespaces and RBAC: Roles, ServiceAccounts, Quotas and kubectl auth can-i
Split a cluster with namespaces and control access with RBAC: Roles, ClusterRoles, bindings, ServiceAccounts, quotas, limit ranges and how to fix Forbidden errors.
- Kubernetes Tutorials
How to Debug Kubernetes: kubectl logs, describe, events, exec and debug
A step-by-step method to troubleshoot Kubernetes pods, services and nodes with kubectl get, describe, logs, events, exec, port-forward and ephemeral debug containers.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu on Alibaba Cloud: Getting Started with the Alicloud Provider
Deploy your first resources on Alibaba Cloud with Terraform or OpenTofu: RAM user credentials, a VPC with a vSwitch, a security group, an ECS instance and an OSS bucket.
- Kubernetes Tutorials
Kubernetes ImagePullBackOff and ErrImagePull: Causes, Debugging and Fixes
Fix ImagePullBackOff and ErrImagePull in Kubernetes: wrong image or tag, private registry credentials, ECR tokens, rate limits, local images and network problems.
- Kubernetes Tutorials
Argo CD and GitOps on Kubernetes: Install and Deploy Your First App
Learn what GitOps is and install Argo CD in a Kubernetes cluster to deploy applications automatically from Git, with an Application example, sync policies and Helm.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu on Azure: Getting Started with the AzureRM Provider
Deploy your first Azure resources with Terraform or OpenTofu: Azure CLI login, resource group, virtual network, storage account and remote state.
- Terraform & OpenTofu Tutorials
Terraform Workspaces vs Directories: How to Manage Environments
Compare Terraform and OpenTofu workspaces with separate directories and tfvars files to manage dev, pre and pro environments, and learn which one to use.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu on DigitalOcean: Droplets, VPC and Firewall
Deploy your first resources on DigitalOcean with Terraform or OpenTofu: API token, an SSH key, a VPC, a Droplet and a cloud firewall, with a comparison to AWS.
- Terraform & OpenTofu Tutorials
Terraform Security Scanning with tflint, Checkov and Trivy
Find misconfigurations in Terraform and OpenTofu code before deploying: tflint for errors, Checkov and Trivy for AWS security issues, with CI examples.
- Terraform & OpenTofu Tutorials
Terraform Conditionals and for Expressions: Ternary, count, splat and Examples
How to write conditions and loops in Terraform and OpenTofu: the ternary operator, count and for_each switches, for expressions, splat, try, lookup, merge and flatten.
- Terraform & OpenTofu Tutorials
AWS Organizations and Multi-Account Setup with Terraform
Design and create a multi-account AWS landing zone with Terraform or OpenTofu: AWS Organizations, OUs, accounts, service control policies and cross-account roles.
- Terraform & OpenTofu Tutorials
Terraform depends_on and Resource Dependencies Explained
How Terraform builds its dependency graph, the difference between implicit and explicit dependencies, when to use depends_on, and how to fix dependency cycles.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu with Cloudflare: DNS, WAF, Caching, R2 and Tunnels
Manage Cloudflare with Terraform or OpenTofu: DNS records, WAF, redirect, cache and rate limit rules, zone settings, DNSSEC, R2 buckets and tunnels.
- Terraform & OpenTofu Tutorials
AWS KMS and Secrets Manager with Terraform: Encrypt and Store Secrets
Create KMS keys with rotation and policies, and store and read secrets in AWS Secrets Manager and SSM Parameter Store with Terraform or OpenTofu, safely.
- Terraform & OpenTofu Tutorials
AWS Security Monitoring with Terraform: CloudTrail, GuardDuty, Config and Security Hub
Enable AWS security services with Terraform or OpenTofu: an organization CloudTrail, GuardDuty, AWS Config and Security Hub, with encrypted log storage.
- Terraform & OpenTofu Tutorials
AWS CloudWatch Alarms, Logs and Dashboards with Terraform
Monitor AWS with Terraform or OpenTofu: log groups with retention, metric filters, CloudWatch alarms that notify through SNS, and a dashboard.
- Terraform & OpenTofu Tutorials
Static Website on AWS with S3, CloudFront and ACM using Terraform
Host a static website on AWS with a private S3 bucket, CloudFront with Origin Access Control, an ACM certificate and Route 53, using Terraform or OpenTofu.
- Terraform & OpenTofu Tutorials
Terraform Provisioners and EC2 user_data: When to Use Each (and Alternatives)
How Terraform provisioners (local-exec, remote-exec, file) work, why they are a last resort, and how to use EC2 user_data, cloud-init and Ansible instead.
- Terraform & OpenTofu Tutorials
AWS DynamoDB Tables with Terraform: Keys, Indexes, TTL and Autoscaling
Create AWS DynamoDB tables with Terraform or OpenTofu: partition and sort keys, global secondary indexes, on-demand or provisioned capacity, TTL, backups and encryption.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu on Google Cloud: Getting Started with the Google Provider
Deploy your first resources on Google Cloud with Terraform or OpenTofu: authentication, enabling APIs, a VPC network, a Cloud Storage bucket and remote state in GCS.
- AWS Tutorials
AWS Three-Tier Web Architecture: Reference Design with Terraform
A reference architecture for a highly available three-tier web application on AWS: VPC, ALB, EC2 auto scaling and RDS, with the Terraform modules to build each layer.
- Terraform & OpenTofu Tutorials
HashiCorp Terraform Associate Certification Study Guide
A study plan for the HashiCorp Certified Terraform Associate exam: topics, what to practice, commands to know and links to hands-on tutorials with AWS.
- Terraform & OpenTofu Tutorials
AWS Systems Manager Session Manager with Terraform: SSH Without Open Ports
Connect to EC2 instances without SSH keys, bastion hosts or open port 22 using AWS Systems Manager Session Manager, configured with Terraform or OpenTofu.
- Terraform & OpenTofu Tutorials
Terraform and OpenTofu Interview Questions and Answers (with AWS Examples)
The most common Terraform and OpenTofu interview questions for DevOps and cloud roles, with short answers on state, modules, lifecycle, secrets, AWS and CI/CD.
- Terraform & OpenTofu Tutorials
Terraform for_each vs count: Which One to Use and Why
Learn the difference between the Terraform and OpenTofu count and for_each meta-arguments, with AWS examples, and why for_each avoids destroying resources.
- Terraform & OpenTofu Tutorials
Terragrunt with OpenTofu: Keep Your Configuration DRY
What Terragrunt is and how to use it with OpenTofu or Terraform to avoid repeating backend and provider code across environments, with a complete AWS example.
- Terraform & OpenTofu Tutorials
Terraform Data Sources and terraform_remote_state with AWS Examples
How to read existing infrastructure with Terraform data sources and share values between configurations with terraform_remote_state or SSM Parameter Store.
- Terraform & OpenTofu Tutorials
Terraform Dynamic Blocks: Generate Nested Blocks from Variables
How to use dynamic blocks in Terraform and OpenTofu to generate repeated nested blocks such as security group rules, with for_each, iterator and AWS examples.
- Terraform & OpenTofu Tutorials
Terraform vs CloudFormation vs CDK vs Pulumi: Which IaC Tool for AWS?
Compare Terraform/OpenTofu, AWS CloudFormation, AWS CDK and Pulumi for AWS infrastructure: language, state, multi-cloud, drift, learning curve and when to choose each.
- AWS Tutorials
AWS CLI Cheat Sheet: Profiles, SSO, S3, EC2, IAM and Useful Queries
A quick reference for the AWS CLI: profiles and SSO, plus the most used commands for S3, EC2, IAM, Lambda and logs, with --query and --output examples.
- Terraform & OpenTofu Tutorials
Terraform Helm Provider: Deploy Helm Charts to Kubernetes with OpenTofu
Install Helm charts in a Kubernetes cluster with the Terraform and OpenTofu Helm provider: values, secrets, upgrades, ingress-nginx and cert-manager examples.
- Terraform & OpenTofu Tutorials
How to Encrypt Terraform State with OpenTofu
Step-by-step guide to encrypting the Terraform state file with OpenTofu state encryption and AWS KMS, with a full configuration example.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Route 53 (DNS) (14)
Using the Terraform aws_route53_delegation_set, aws_route53_zone, and aws_route53_record resource blocks to configure DNS in AWS.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS RDS Instances (13)
Using the Terraform aws_db_instance resource block to configure, launch, and secure RDS instances.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS EC2 Instances (12)
How to use the Terraform aws_instance resource block to configure, launch, and secure EC2 instances.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS AMIs (11)
How to use the Terraform aws_ami data source to find the AMI (root volume template with an operating system) used to launch EC2 instances.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Key Pairs (10)
How to configure and use the Terraform aws_key_pair resource to upload an SSH public key to AWS and use it for public key authentication on EC2 instances.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Security Groups (9)
How to configure and use the Terraform aws_security_group and aws_security_group_rule resources to create AWS security groups and secure the infrastructure.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Routing Tables (8)
How to configure and use the Terraform aws_route_table, aws_route, and aws_main_route_table_association resource blocks to create and manage AWS Routing Tables.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS NAT Gateway (7)
How to configure and use the Terraform aws_nat_gateway and aws_eip resources to create NAT Gateways and Elastic IPs for the private subnets of a VPC.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Internet Gateway (6)
How to configure and use the Terraform aws_internet_gateway resource block to create an AWS Internet Gateway that gives a VPC access to the Internet.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Subnets (5)
How to configure and use the Terraform aws_subnet resource block to create and manage AWS Subnets inside a VPC.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS VPC (4)
How to configure and use the Terraform aws_vpc resource block to create and manage an AWS VPC (Virtual Private Cloud), step by step.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform AWS Provider (3)
How the Terraform and OpenTofu AWS provider authenticates to AWS, where to store the state and which provider source to use, before creating resources.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Basics (2)
AWS is the world’s leading cloud platform, used by startups and large enterprises.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Basics (1)
How to start building AWS infrastructure with Terraform: Terraform is an Infrastructure as Code (IaC) tool used to provision and manage infrastructure.
- AWS Tutorials
How to use Terraform, AWS, and Ansible Together
How to use Terraform to create AWS infrastructure with tags, and Ansible with its dynamic inventory plugin to configure the servers, linked by the tags.
- Ansible Tutorials
How to Install Ansible
How to install the Ansible control node on Ubuntu with apt or pipx, and check that Ansible works.
- Terraform Best Practices
How to Share Infrastructure in Multiple Terraform Projects?
Sharing infrastructure across multiple Terraform projects using Data Sources helps maintain consistency, reduce redundancy, and promote collaboration.
- Terraform & OpenTofu Tutorials
Generating and using AWS Key Pairs with Terraform or OpenTofu
Generation of an Ed25519 Key Pair for SSH Authentication on AWS Linux Machines and Uploading of Key Pairs with Terraform.
- Terraform & OpenTofu Tutorials
Terraform AWS EKS Cluster Deployment & Application Publishing through ALB
This how-to demonstrates how to use Terraform to create an AWS EKS cluster and deploy an application along with a Load Balancer on top.
- AWS Tutorials
How to Install AWS CLI V2
How to install the AWS CLI (Command Line Interface) to interact with Amazon Web Services through the command line.
- Terraform & OpenTofu Tutorials
Terraform AWS ECS Fargate Cluster Deployment & Docker Container Publishing
How-to use Terraform or OpenTofu to create an AWS ECS (Elastic Container Service) running in Fargate and deploy a Docker container.
- Terraform & OpenTofu Tutorials
How to Create AWS IAM users with Terraform & OpenTofu
Programmatically creating AWS users using IaC tools like Terraform & OpenTofu
- Terraform & OpenTofu Tutorials
Using a PGP Key Pair
Generation of a Pretty Good Privacy (PGP) Key Pair for automated AWS IAM user access key creation with Terraform.
- Terraform & OpenTofu Tutorials
How to Deploy Applications in Kubernetes using Terraform
How to publish multiple replicas of an Application (from the Docker Registry) and create a NodePort in Kubernetes using Terraform (in 10 seconds)
- Terraform & OpenTofu Tutorials
How to Migrate Infrastructure from Terraform to OpenTofu
How to migrate existing AWS Terraform-managed infrastructure that uses remote backend storage (e.g. S3) to OpenTofu.
- Kubernetes Tutorials
How to use an external NFS Persistent Volume on Kubernetes
How to use NFS Kubernetes Persistent Volumes for the storage of data. Postgres is used as an example.
- Kubernetes Tutorials
How to Install Helm
How to install Helm, the package manager for Kubernetes, and use it to deploy applications to a cluster.
- Kubernetes Tutorials
How to Install K3s as a local development Kubernetes cluster
K3s.io is a Lightweight Kubernetes cluster perfect for development or edge deployments. K3s is a CNCF project, originally developed by Rancher.
- Terraform & OpenTofu Tutorials
How to Deploy Applications in Kubernetes using OpenTofu
How to publish multiple replicas of an application from the Docker registry and create a NodePort or a LoadBalancer in Kubernetes using OpenTofu.
- Terraform & OpenTofu Tutorials
How to Install OpenTofu
Install OpenTofu on Ubuntu with the official installer script or manually from the GitHub releases, check the installation and upgrade it.
- Kubernetes Tutorials
Istio Patterns: Traffic Splitting in Kubernetes (Canary Release)
Tutorial on how to use Istio on Kubernetes for releasing new versions of software to the Cloud.
- Terraform & OpenTofu Tutorials
How To Debug Terraform
Options and techniques for debugging Terraform and OpenTofu Infrastructure plans.
- Terraform & OpenTofu Tutorials
Terraform Cloud Agents in a Kubernetes Cluster
How Terraform Cloud agents (HCP Terraform agents) run Terraform on private infrastructure, deployed in a Kubernetes cluster with Terraform itself.
- Kubernetes Tutorials
Kubernetes Cluster using Vagrant and Ansible with Containerd (in 3 minutes)
Tutorial and full source code explaining how to create a Kubernetes cluster with Ansible and Vagrant for local development under 3 minutes.
- Kubernetes Tutorials
Installing Istio on Kubernetes
How to install Istio in a Kubernetes Cluster to use it as a service mesh for a microservices architecture.
- Kubernetes Tutorials
Installing the Kubernetes Dashboard and managing the Cluster using kubectl
How to install the Kubernetes Dashboard and manage the cluster after installation.
- Kubernetes Tutorials
Running Postgres in Kubernetes with a Persistent NFS Volume
How to create a Kubernetes persistent volume for Postgres long term storage of data using a NFS Volume
- Terraform & OpenTofu Tutorials
How to disable AWS instance destroy with Terraform?
Techniques to prevent infrastructure destroy in Terraform by protecting selected instances and resources from being accidentally destroyed.
- Terraform & OpenTofu Tutorials
How to programmatically use your public Internet IP address in Terraform?
Obtain your public IP address and use it in Terraform to create AWS Security Rules.
- Terraform & OpenTofu Tutorials
Creating AWS RDS Database with Terraform (4/5)
Tutorial and source code explaining how to create and manage MariaDB (or MySQL) RDS database with Terraform in AWS.
- Terraform & OpenTofu Tutorials
AWS Route 53, AMI Lookup and EC2 Creation with Terraform (3/5)
Tutorial and source code explaining how to manage AWS Route 53 DNS Service, create and register EC2 instances and find an AMI with Terraform.
- AWS Tutorials
Creating AWS EC2 Instances and Security Rules with Terraform (5/5)
Tutorial and source code explaining how to manage AWS EC2 Instances and Security with Terraform.
- Terraform & OpenTofu Tutorials
AWS VPC Subnets, Routing Tables and Internet Access using Terraform (2/5)
Tutorial and source code explaining how to create and manage AWS networking with Terraform.
- AWS Tutorials
AWS VPC, Route 53, RDS MariaDB, EC2 using Ansible and Terraform (1/5)
Tutorial and source code explaining how to provision and configure a VPC, Route 53, RDS MariaDB, Instances and security groups using Ansible and Terraform…
- Kubernetes Tutorials
Using a NodePort in a Kubernetes Cluster on top of VirtualBox
Kubernetes tutorial explaining how to use a NodePort to publish applications in a Kubernetes cluster running in VirtualBox with Vagrant and Ansible
- Kubernetes Tutorials
Istio Patterns: Traffic Splitting in Kubernetes (Header/Cookie Based)
How to split traffic in Kubernetes with Istio based on request headers, tutorial, and examples with source code.
- AWS Tutorials
Create an AWS IAM User for Demos
How to create AWS IAM users for programmatic access to the AWS Cloud API, to be used with Terraform / OpenTofu and Ansible demos.
- AWS Tutorials
Create an AWS Account for Demos
In order to run the examples presented in IT Wonder Lab you will need accounts in different cloud providers.