File tree 3 files changed +60
-0
lines changed
3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## These files are for use only with Hands-on lab in the Terraform Cert Prep course on ACG
2
+ ## No guarantees are provided for it's working outside of the mentioned lab.
3
+
4
+
Original file line number Diff line number Diff line change
1
+ provider "kubernetes" {}
2
+
3
+ resource "kubernetes_deployment" "tf-k8s-deployment" {
4
+ metadata {
5
+ name = " tf-k8s-deploy"
6
+ labels = {
7
+ name = " terraform-k8s-deployment"
8
+ }
9
+ }
10
+
11
+ spec {
12
+ replicas = 2
13
+
14
+ selector {
15
+ match_labels = {
16
+ name = " terraform-k8s-deployment"
17
+ }
18
+ }
19
+
20
+ template {
21
+ metadata {
22
+ labels = {
23
+ name = " terraform-k8s-deployment"
24
+ }
25
+ }
26
+
27
+ spec {
28
+ container {
29
+ image = " nginx"
30
+ name = " nginx"
31
+
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+
39
+
40
+
Original file line number Diff line number Diff line change
1
+ resource "kubernetes_service" "tf-k8s-service" {
2
+ metadata {
3
+ name = " terraform-k8s-service"
4
+ labels = {
5
+ name = " tf-k8s-deploy"
6
+ }
7
+ }
8
+ spec {
9
+ port {
10
+ port = 80
11
+ target_port = 80
12
+ node_port = 30080
13
+ }
14
+ type = " NodePort"
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments