Skip to content

Terraform module to implement Socat in Kubernetes for troubleshooting purposes

License

Notifications You must be signed in to change notification settings

Glaaj/tf-k8s-socat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tf-k8s-socat

Module to implement socat in Kubernetes through Terraform.

Usage:

module "socat" {
  source           = "[email protected]:glaaj/tf-k8s-socat.git"
  version          = 1.0.0
  namespace        = "insertnamehere"
  endpoint         = "inserturlhere"
  destination_port = xxx
  source_port      = xxx
  protocol         = "TCP"
}

Why

Use the pods that the deployment creates to troubleshoot networking towards targets that may only be accessible from sources inside a cluster. For example a database that only allows connectivity from the cluster.

Visual representation

Requirements

Name Version
terraform >= 1.7.0
kubernetes > 2.0.0, < 3.0.0
random > 3.0.0, < 4.0.0

Providers

Name Version
kubernetes > 2.0.0, < 3.0.0
random > 3.0.0, < 4.0.0

Modules

No modules.

Resources

Name Type
kubernetes_deployment.this resource
random_pet.this resource

Inputs

Name Description Type Default Required
destination_port Port to which socat should forward the traffic. number n/a yes
endpoint Address to which socat should forward traffic. string n/a yes
namespace Name of the namespace in which the deployment should be placed. string "default" no
protocol The protocol that socat should use, options are 'TCP' or 'UDP', defaults to TCP. string "TCP" no
source_port Port on which socat should listen for traffic. number n/a yes

Outputs

No outputs.

About

Terraform module to implement Socat in Kubernetes for troubleshooting purposes

Topics

Resources

License

Stars

Watchers

Forks

Languages