Skip to content

tyagraj777/secure-docker-image-build-calico

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secure-docker-image-build-calico

secure Docker image build project using Calico and Terraform

Kubernetes Network Policies with Calico and Terraform

Overview

This project demonstrates how to implement Kubernetes network policies using Calico and Terraform. It includes:

  • A Kubernetes cluster provisioned via Terraform
  • Calico as the CNI plugin
  • Network policies for:
    • Denying all traffic by default
    • Allowing frontend-to-backend communication
    • Isolating namespaces

Prerequisites

  • Terraform
  • kubectl
  • AWS CLI (for EKS)
  • An AWS account

Project Structure

image

Steps

  1. Provision the Kubernetes Cluster
    terraform init
    terraform apply
    
  2. Set Up Calico
    ./scripts/setup-calico.sh
    
  3. Deploy Applications
    kubectl apply -f k8s/deployments/frontend.yaml
    kubectl apply -f k8s/deployments/backend.yaml
    
  4. Apply Network Policies
    kubectl apply -f k8s/network-policies/
    
    

Features

Deny all traffic by default. Enable frontend-to-backend communication. Isolate namespaces for enhanced security.

Cleanup

To destroy resources:

terraform destroy

About

secure Docker image build project usign Calico and Terraform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published