change get minions cmd in docs

This commit is contained in:
jiangyaoguo
2015-07-08 01:37:40 +08:00
parent 5540570e44
commit 102c56ddc4
11 changed files with 40 additions and 40 deletions

View File

@@ -16,20 +16,20 @@ Configuring kubernetes on Fedora via Ansible offers a simple way to quickly crea
1. Host able to run ansible and able to clone the following repo: [kubernetes-ansible](https://github.com/eparis/kubernetes-ansible)
2. A Fedora 20+ or RHEL7 host to act as cluster master
3. As many Fedora 20+ or RHEL7 hosts as you would like, that act as cluster minions
3. As many Fedora 20+ or RHEL7 hosts as you would like, that act as cluster nodes
The hosts can be virtual or bare metal. The only requirement to make the ansible network setup work is that all of the machines are connected via the same layer 2 network.
Ansible will take care of the rest of the configuration for you - configuring networking, installing packages, handling the firewall, etc... This example will use one master and two minions.
Ansible will take care of the rest of the configuration for you - configuring networking, installing packages, handling the firewall, etc... This example will use one master and two nodes.
## Architecture of the cluster
A Kubernetes cluster requires etcd, a master, and n minions, so we will create a cluster with three hosts, for example:
A Kubernetes cluster requires etcd, a master, and n nodes, so we will create a cluster with three hosts, for example:
```
fed1 (master,etcd) = 192.168.121.205
fed2 (minion) = 192.168.121.84
fed3 (minion) = 192.168.121.116
fed2 (node) = 192.168.121.84
fed3 (node) = 192.168.121.116
```
**Make sure your local machine**
@@ -47,7 +47,7 @@ A Kubernetes cluster requires etcd, a master, and n minions, so we will create a
**Tell ansible about each machine and its role in your cluster.**
Get the IP addresses from the master and minions. Add those to the `inventory` file (at the root of the repo) on the host running Ansible.
Get the IP addresses from the master and nodes. Add those to the `inventory` file (at the root of the repo) on the host running Ansible.
We will set the kube_ip_addr to '10.254.0.[1-3]', for now. The reason we do this is explained later... It might work for you as a default.
@@ -110,7 +110,7 @@ The ansible scripts are quite hacky configuring the network, you can see the [RE
**Configure the ip addresses which should be used to run pods on each machine**
The IP address pool used to assign addresses to pods for each minion is the `kube_ip_addr`= option. Choose a /24 to use for each minion and add that to you inventory file.
The IP address pool used to assign addresses to pods for each node is the `kube_ip_addr`= option. Choose a /24 to use for each node and add that to your inventory file.
For this example, as shown earlier, we can do something like this...
@@ -167,19 +167,19 @@ ansible-playbook -i inventory setup.yml
That's all there is to it. It's really that easy. At this point you should have a functioning kubernetes cluster.
**Show services running on masters and minions.**
**Show services running on masters and nodes.**
```
systemctl | grep -i kube
```
**Show firewall rules on the masters and minions.**
**Show firewall rules on the masters and nodes.**
```
iptables -nvL
```
**Create the following apache.json file and deploy pod to minion.**
**Create the following apache.json file and deploy pod to node.**
```
cat << EOF > apache.json
@@ -215,7 +215,7 @@ EOF
```
**Check where the pod was created**
**Check where the pod was created.**
```
kubectl get pods
@@ -227,14 +227,14 @@ In this example, that was the 10.254 network.
If you see 172 in the IP fields, networking was not setup correctly, and you may want to re run or dive deeper into the way networking is being setup by looking at the details of the networking scripts used above.
**Check Docker status on minion.**
**Check Docker status on node.**
```
docker ps
docker images
```
**After the pod is 'Running' Check web server access on the minion**
**After the pod is 'Running' Check web server access on the node.**
```
curl http://localhost