NEW: kubernetes pod
This commit is contained in:
parent
80ca61e59c
commit
29bcb2fca2
2
tf-modulised/kubernetes/sshd/.gitignore
vendored
Normal file
2
tf-modulised/kubernetes/sshd/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*tfstate*
|
||||
provider.tf
|
20
tf-modulised/kubernetes/sshd/nginx-pod.tf
Normal file
20
tf-modulised/kubernetes/sshd/nginx-pod.tf
Normal file
@ -0,0 +1,20 @@
|
||||
resource "kubernetes_pod" "nginx" {
|
||||
metadata {
|
||||
name = "nginx-example"
|
||||
labels = {
|
||||
App = "nginx"
|
||||
}
|
||||
}
|
||||
|
||||
spec {
|
||||
container {
|
||||
image = "nginx:latest"
|
||||
name = "example"
|
||||
|
||||
port {
|
||||
container_port = 9080
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
25
tf-modulised/kubernetes/sshd/provider.tf-example
Normal file
25
tf-modulised/kubernetes/sshd/provider.tf-example
Normal file
@ -0,0 +1,25 @@
|
||||
variable "kubernetes_client_certificate"{
|
||||
type = string
|
||||
default = "xxx"
|
||||
}
|
||||
|
||||
variable "kubernetes_client_key"{
|
||||
type = string
|
||||
default = "xxx"
|
||||
}
|
||||
|
||||
variable "kubernetes_cluster_ca_certificate"{
|
||||
type = string
|
||||
default = "xxx"
|
||||
}
|
||||
|
||||
provider "kubernetes" {
|
||||
load_config_file = "false"
|
||||
|
||||
host = "https://192.168.86.51:6443"
|
||||
|
||||
client_certificate = base64decode(var.kubernetes_client_certificate)
|
||||
client_key = base64decode(var.kubernetes_client_key)
|
||||
cluster_ca_certificate = base64decode(var.kubernetes_cluster_ca_certificate)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user