Skip to content

Commit 50841e6

Browse files
authored
Merge pull request aws-samples#270 from mdelagrange/delete-old-iso
add step to delete the old minikube ISO if present
2 parents 20ef74c + ef7a703 commit 50841e6

File tree

2 files changed

+39
-26
lines changed

2 files changed

+39
-26
lines changed

getting-started/readme.adoc

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Containers:
8383
/var/run/secrets/kubernetes.io/serviceaccount from default-token-cqht0 (ro)
8484
Conditions:
8585
Type Status
86-
Initialized True
87-
Ready True
88-
PodScheduled True
86+
Initialized True
87+
Ready True
88+
PodScheduled True
8989
Volumes:
9090
default-token-cqht0:
9191
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
172172
kubernetes ClusterIP 100.64.0.1 <none> 443/TCP 2d
173173
web NodePort 100.67.45.110 <none> 80:32400/TCP 32s
174174

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.
176176

177177
=== View the NGiNX deployment using the NodePort
178178

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:
180180

181-
$ kubectl get pods -l="run=nginx"
181+
$ kubectl get pods -l="run=nginx"
182182
NAME READY STATUS RESTARTS AGE
183183
nginx-4217019353-pmkzb 1/1 Running 0 16m
184184

185185
$ kubectl get pod nginx-4217019353-pmkzb -o=jsonpath={.spec.nodeName}
186186
ip-172-20-87-91.us-east-2.compute.internal
187187

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.
189189

190190
Next we need the dynamic port the service opened for us on the node running the NGiNX pod.
191191

@@ -200,7 +200,7 @@ Replace the `Values` value with the nodeName retreived earlier.
200200
[
201201
"sg-c0285fa8"
202202
]
203-
]
203+
]
204204

205205
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.
206206

@@ -219,7 +219,7 @@ Finally, we can use the AWS CLI to retrieve the public hostname of the node itse
219219

220220
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:
221221

222-
$ curl http://ec2-18-216-5-70.us-east-2.compute.amazonaws.com:32400
222+
$ curl http://ec2-18-216-5-70.us-east-2.compute.amazonaws.com:32400
223223
<!DOCTYPE html>
224224
<html>
225225
<head>
@@ -240,8 +240,8 @@ You should now be able to point a browser or use `cURL` to retrieve the combined
240240
<a href="http://nginx.org/">nginx.org</a>.<br/>
241241
Commercial support is available at
242242
<a href="http://nginx.com/">nginx.com</a>.</p>
243-
<p><em>Thank you for using nginx.</em></p>
244-
243+
<p><em>Thank you for using nginx.</em></p>
244+
245245
== Expose the deployment as a service (via a Load Balancer)
246246

247247
Delete the existing service and deployment:
@@ -303,4 +303,3 @@ Delete all the Kubernetes resources created so far:
303303
Revoke access on the port you opened on the EC2 security group earlier:
304304

305305
$ aws ec2 revoke-security-group-ingress --group-id sg-c0285fa8 --protocol tcp --port 32400 --cidr 0.0.0.0/0
306-

local-development/readme.adoc

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
:imagesdir: ../images
55
:toc:
66

7-
For local development purposes, you can create a one-node cluster using https://github.com/kubernetes/minikube[Minikube].
8-
Hosted solutions or cloud-based solutions provide the scalability and higher availability for staging or production purposes.
7+
For local development purposes, you can create a one-node cluster using https://github.com/kubernetes/minikube[Minikube].
8+
Hosted solutions or cloud-based solutions provide the scalability and higher availability for staging or production purposes.
99
A complete list of solutions to create a Kubernetes cluster is explained at http://kubernetes.io/docs/getting-started-guides/.
1010

11-
This section will explain how to create and shutdown a development Kubernetes cluster using Minikube.
11+
This section will explain how to create and shutdown a development Kubernetes cluster using Minikube.
1212

1313
== Download and Install
1414

15-
Minikube runs a single-node Kubernetes cluster inside a VM on your laptop.
16-
This allows you to easily try out Kubernetes on your local machine.
15+
Minikube runs a single-node Kubernetes cluster inside a VM on your laptop.
16+
This allows you to easily try out Kubernetes on your local machine.
1717
Minikube packages and configures a Linux VM, the container runtime, and all Kubernetes components - optimized for local development.
1818

1919
Complete installation instructions are available at https://github.com/kubernetes/minikube. Here are quick instructions:
@@ -26,28 +26,42 @@ Provision and install a local Kubernetes cluster on a Mac OS via https://brew.sh
2626

2727
$ brew cask install virtualbox
2828

29-
. Install minikube
30-
31-
$ brew cask install minikube
29+
. Install (or update) minikube
30+
+
31+
*If you've never installed minikube before:*
32+
+
33+
brew cask install minikube
34+
+
35+
Verify the version:
3236
+
33-
If `minikube` has already been installed earlier, then you can update the install using the following command:
37+
$ minikube version
38+
minikube version: v0.24.1
3439
+
35-
$ brew cask reinstall minikube
40+
*If you already have minikube:*
3641
+
37-
If you receive this error after `brew cask install minikube`:
42+
brew cask reinstall minikube
3843
+
44+
[NOTE]
45+
====
46+
If you receive this error:
47+
3948
==> Installing Cask minikube
4049
Error: It seems there is already a Binary at '/usr/local/bin/minikube'; not linking.
41-
+
50+
4251
Run this command:
43-
+
52+
4453
$ sudo cp ~/Library/Caches/Homebrew/Cask/minikube--0.24.1 /usr/local/bin/minikube
54+
====
4555
+
4656
Verify the version:
47-
+
57+
4858
$ minikube version
4959
minikube version: v0.24.1
5060
+
61+
Finally delete the previous minikube ISO:
62+
63+
minikube delete
64+
+
5165
. Install Kubectl CLI
5266

5367
$ brew install kubernetes-cli

0 commit comments

Comments
 (0)