Skip to content

Commit 062e694

Browse files
committed
Fixes #164: Kubernetes example says load cluster.k8s.test but there is nothing there by default.
1 parent c98a3f2 commit 062e694

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

kubernetes/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ Note: *If there are any errors during the course of running `vagrant up`, and it
2424
### 3 - Configure your host machine to access the VM.
2525

2626
1. [Edit your hosts file](http://www.rackspace.com/knowledge_center/article/how-do-i-modify-my-hosts-file), adding the line `192.168.84.3 cluster.k8s.test` so you can connect to the VM.
27-
2. Open your browser and access [http://cluster.k8s.test](http://cluster.k8s.test).
27+
28+
### 4 - Deploy applications to the Kubernetes cluster
29+
30+
For details on how to deploy all these examples, please refer to chapter 14 in Ansible for DevOps. One quick example you can test locally:
31+
32+
1. cd into the 'examples' directory, and run the `k8s-module.yml` playbook, which creates an Nginx deployment and service on the cluster: `ansible-playbook -i ../inventory k8s-module.yml`
33+
2. Copy the nodePort from the final task output in that playbook; this is the port on which Nginx is accessible.
34+
3. Open your browser and access [http://cluster.k8s.test:32474/](http://cluster.k8s.test:32474/) (assuming nodePort is `32474`).
2835

2936
## Notes
3037

kubernetes/examples/k8s-module.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
app: nginx
4141

4242
- name: Get the details of the a4d-nginx Service.
43-
k8s:
43+
k8s_info:
4444
api_version: v1
4545
kind: Service
4646
name: a4d-nginx
@@ -49,4 +49,4 @@
4949

5050
- name: Print the NodePort of the a4d-nginx Service.
5151
debug:
52-
var: a4d_nginx_service.result.spec.ports[0].nodePort
52+
var: a4d_nginx_service.resources[0].spec.ports[0].nodePort

0 commit comments

Comments
 (0)