You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: getting-started/readme.adoc
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,9 +83,9 @@ Containers:
83
83
/var/run/secrets/kubernetes.io/serviceaccount from default-token-cqht0 (ro)
84
84
Conditions:
85
85
Type Status
86
-
Initialized True
87
-
Ready True
88
-
PodScheduled True
86
+
Initialized True
87
+
Ready True
88
+
PodScheduled True
89
89
Volumes:
90
90
default-token-cqht0:
91
91
Type: Secret (a volume populated by a Secret)
@@ -172,20 +172,20 @@ Expose the deployment creates what Kubernetes calls a service. You can see the p
172
172
kubernetes ClusterIP 100.64.0.1 <none> 443/TCP 2d
173
173
web NodePort 100.67.45.110 <none> 80:32400/TCP 32s
174
174
175
-
We will learn more about Services and Deployments later in the workshop.
175
+
We will learn more about Services and Deployments later in the workshop.
176
176
177
177
=== View the NGiNX deployment using the NodePort
178
178
179
-
First, we find the hostname of the node on which the nginx Pod is running:
179
+
First, we find the hostname of the node on which the nginx Pod is running:
180
180
181
-
$ kubectl get pods -l="run=nginx"
181
+
$ kubectl get pods -l="run=nginx"
182
182
NAME READY STATUS RESTARTS AGE
183
183
nginx-4217019353-pmkzb 1/1 Running 0 16m
184
184
185
185
$ kubectl get pod nginx-4217019353-pmkzb -o=jsonpath={.spec.nodeName}
186
186
ip-172-20-87-91.us-east-2.compute.internal
187
187
188
-
The `-o` flag allows us to choose a different output format, and choosing the `jsonpath` output format allows us to filter the resultant JSON down to the exact value we need.
188
+
The `-o` flag allows us to choose a different output format, and choosing the `jsonpath` output format allows us to filter the resultant JSON down to the exact value we need.
189
189
190
190
Next we need the dynamic port the service opened for us on the node running the NGiNX pod.
191
191
@@ -200,7 +200,7 @@ Replace the `Values` value with the nodeName retreived earlier.
200
200
[
201
201
"sg-c0285fa8"
202
202
]
203
-
]
203
+
]
204
204
205
205
Next, we add an ingress rule to the security group opening up the port on the node to anyone - `0.0.0.0/0`. This is purely for demonstration purposes in this workshop and is not a best practice. Most services will be exposed behind a load balancer, which we cover in the next section. For the command below, replace the `--group-id` parameter with the GroupId you just retrieved, and the `--port` parameter value with the nodePort retreived above.
206
206
@@ -219,7 +219,7 @@ Finally, we can use the AWS CLI to retrieve the public hostname of the node itse
219
219
220
220
You should now be able to point a browser or use `cURL` to retrieve the combined <public hostname>:<node port> and see the default NGiNX homepage:
0 commit comments