k8s pod
This commit is contained in:
parent
af71156066
commit
a953776b39
1 changed files with 15 additions and 2 deletions
|
@ -3,8 +3,21 @@ provider "kubernetes" {
|
|||
host = "http://127.0.0.1:8001"
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace" "example" {
|
||||
resource "kubernetes_namespace" "ns" {
|
||||
metadata {
|
||||
name = "my-first-namespace"
|
||||
name = "terraform-test"
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_pod" "web" {
|
||||
metadata {
|
||||
name = "web"
|
||||
namespace = kubernetes_namespace.ns.id
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
image = "nginx:latest"
|
||||
name = "web"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue