Last active
January 17, 2024 23:28
-
-
Save YurgenUA/dc82633b2c52786cfee265fc4c9c38e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "kubernetes_deployment" "demo" { | |
metadata { | |
name = "demo-dp" | |
namespace = kubernetes_namespace.playground.id | |
} | |
spec { | |
replicas = 1 | |
selector { | |
match_labels = { | |
app = "demo-lb" | |
} | |
} | |
template { | |
metadata { | |
labels = { | |
app = "demo-lb" | |
} | |
} | |
spec { | |
service_account_name = kubernetes_service_account.secret_privileged.metadata[0].name | |
automount_service_account_token = true | |
container { | |
name = "bibinwilson" | |
image = "bibinwilson/docker-kubectl:latest" | |
volume_mount { | |
mount_path = "/etc/sensitive" | |
name = "sensitive-vl" | |
read_only = true | |
} | |
} | |
volume { | |
name = "sensitive-vl" | |
secret { | |
secret_name = kubernetes_secret.top_secret.metadata[0].name | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment