mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-22 16:23:25 +01:00
41 lines
848 B
HCL
41 lines
848 B
HCL
resource "kubernetes_deployment" "your-deployment" {
|
|
|
|
depends_on = [kubernetes_namespace.your-namespace]
|
|
|
|
metadata {
|
|
name = "your-deployment"
|
|
namespace = "your-namespace"
|
|
labels = {
|
|
app = "your-app-selector"
|
|
}
|
|
}
|
|
|
|
spec {
|
|
replicas = 1
|
|
|
|
selector {
|
|
match_labels = {
|
|
app = "your-app-selector"
|
|
}
|
|
}
|
|
|
|
template {
|
|
metadata {
|
|
labels = {
|
|
app = "your-app-selector"
|
|
}
|
|
}
|
|
|
|
spec {
|
|
container {
|
|
image = "your-image:latest"
|
|
name = "your-container"
|
|
|
|
port {
|
|
container_port = 80
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |