mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	More fixes for release 0.17.0
This commit is contained in:
		@@ -7,7 +7,7 @@
 | 
				
			|||||||
  "containers":[
 | 
					  "containers":[
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "controller-manager",
 | 
					      "name": "controller-manager",
 | 
				
			||||||
      "image": "gcr.io/google_containers/hyperkube:v0.14.1",
 | 
					      "image": "gcr.io/google_containers/hyperkube:v0.17.0",
 | 
				
			||||||
      "command": [
 | 
					      "command": [
 | 
				
			||||||
              "/hyperkube",
 | 
					              "/hyperkube",
 | 
				
			||||||
              "controller-manager",
 | 
					              "controller-manager",
 | 
				
			||||||
@@ -19,7 +19,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "apiserver",
 | 
					      "name": "apiserver",
 | 
				
			||||||
      "image": "gcr.io/google_containers/hyperkube:v0.14.1",
 | 
					      "image": "gcr.io/google_containers/hyperkube:v0.17.0",
 | 
				
			||||||
      "command": [
 | 
					      "command": [
 | 
				
			||||||
              "/hyperkube",
 | 
					              "/hyperkube",
 | 
				
			||||||
              "apiserver",
 | 
					              "apiserver",
 | 
				
			||||||
@@ -32,7 +32,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "scheduler",
 | 
					      "name": "scheduler",
 | 
				
			||||||
      "image": "gcr.io/google_containers/hyperkube:v0.14.1",
 | 
					      "image": "gcr.io/google_containers/hyperkube:v0.17.0",
 | 
				
			||||||
      "command": [
 | 
					      "command": [
 | 
				
			||||||
              "/hyperkube",
 | 
					              "/hyperkube",
 | 
				
			||||||
              "scheduler",
 | 
					              "scheduler",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@
 | 
				
			|||||||
  "containers":[
 | 
					  "containers":[
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "controller-manager",
 | 
					      "name": "controller-manager",
 | 
				
			||||||
      "image": "gcr.io/google_containers/hyperkube:v0.16.2",
 | 
					      "image": "gcr.io/google_containers/hyperkube:v0.17.0",
 | 
				
			||||||
      "command": [
 | 
					      "command": [
 | 
				
			||||||
              "/hyperkube",
 | 
					              "/hyperkube",
 | 
				
			||||||
              "controller-manager",
 | 
					              "controller-manager",
 | 
				
			||||||
@@ -19,7 +19,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "apiserver",
 | 
					      "name": "apiserver",
 | 
				
			||||||
      "image": "gcr.io/google_containers/hyperkube:v0.16.2",
 | 
					      "image": "gcr.io/google_containers/hyperkube:v0.17.0",
 | 
				
			||||||
      "command": [
 | 
					      "command": [
 | 
				
			||||||
              "/hyperkube",
 | 
					              "/hyperkube",
 | 
				
			||||||
              "apiserver",
 | 
					              "apiserver",
 | 
				
			||||||
@@ -32,7 +32,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "scheduler",
 | 
					      "name": "scheduler",
 | 
				
			||||||
      "image": "gcr.io/google_containers/hyperkube:v0.16.2",
 | 
					      "image": "gcr.io/google_containers/hyperkube:v0.17.0",
 | 
				
			||||||
      "command": [
 | 
					      "command": [
 | 
				
			||||||
              "/hyperkube",
 | 
					              "/hyperkube",
 | 
				
			||||||
              "scheduler",
 | 
					              "scheduler",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,13 +26,13 @@ across reboots and failures.
 | 
				
			|||||||
### Startup etcd for flannel and the API server to use
 | 
					### Startup etcd for flannel and the API server to use
 | 
				
			||||||
Run:
 | 
					Run:
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host -d kubernetes/etcd:2.0.5.1 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
 | 
					sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host -d gcr.io/google_containers/etcd:2.0.9 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Next, you need to set a CIDR range for flannel.  This CIDR should be chosen to be non-overlapping with any existing network you are using:
 | 
					Next, you need to set a CIDR range for flannel.  This CIDR should be chosen to be non-overlapping with any existing network you are using:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host kubernetes/etcd:2.0.5.1 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }'
 | 
					sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.0.9 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }'
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -108,20 +108,20 @@ systemctl start docker
 | 
				
			|||||||
Ok, now that your networking is set up, you can startup Kubernetes, this is the same as the single-node case, we will use the "main" instance of the Docker daemon for the Kubernetes components.
 | 
					Ok, now that your networking is set up, you can startup Kubernetes, this is the same as the single-node case, we will use the "main" instance of the Docker daemon for the Kubernetes components.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
sudo docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock  gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests-multi
 | 
					sudo docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock  gcr.io/google_containers/hyperkube:v0.17.0 /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=127.0.0.1 --config=/etc/kubernetes/manifests-multi
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Also run the service proxy
 | 
					### Also run the service proxy
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
sudo docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube proxy --master=http://127.0.0.1:8080 --v=2
 | 
					sudo docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v0.17.0 /hyperkube proxy --master=http://127.0.0.1:8080 --v=2
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Test it out
 | 
					### Test it out
 | 
				
			||||||
At this point, you should have a functioning 1-node cluster.  Let's test it out!
 | 
					At this point, you should have a functioning 1-node cluster.  Let's test it out!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Download the kubectl binary
 | 
					Download the kubectl binary
 | 
				
			||||||
([OS X](http://storage.googleapis.com/kubernetes-release/release/v0.14.2/bin/darwin/amd64/kubectl))
 | 
					([OS X](http://storage.googleapis.com/kubernetes-release/release/v0.17.0/bin/darwin/amd64/kubectl))
 | 
				
			||||||
([linux](http://storage.googleapis.com/kubernetes-release/release/v0.14.2/bin/linux/amd64/kubectl))
 | 
					([linux](http://storage.googleapis.com/kubernetes-release/release/v0.17.0/bin/linux/amd64/kubectl))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
List the nodes
 | 
					List the nodes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -93,14 +93,14 @@ systemctl start docker
 | 
				
			|||||||
Again this is similar to the above, but the ```--api_servers``` now points to the master we set up in the beginning.
 | 
					Again this is similar to the above, but the ```--api_servers``` now points to the master we set up in the beginning.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
sudo docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock  gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube kubelet --api_servers=http://${MASTER_IP}:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=$(hostname -i)
 | 
					sudo docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock  gcr.io/google_containers/hyperkube:v0.17.0 /hyperkube kubelet --api_servers=http://${MASTER_IP}:8080 --v=2 --address=0.0.0.0 --enable_server --hostname_override=$(hostname -i)
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Run the service proxy
 | 
					#### Run the service proxy
 | 
				
			||||||
The service proxy provides load-balancing between groups of containers defined by Kubernetes ```Services```
 | 
					The service proxy provides load-balancing between groups of containers defined by Kubernetes ```Services```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
sudo docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v0.14.2 /hyperkube proxy --master=http://${MASTER_IP}:8080 --v=2
 | 
					sudo docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v0.17.0 /hyperkube proxy --master=http://${MASTER_IP}:8080 --v=2
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -109,16 +109,17 @@ sudo docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v0
 | 
				
			|||||||
On the master you created above, create a file named ```node.yaml``` make it's contents:
 | 
					On the master you created above, create a file named ```node.yaml``` make it's contents:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```yaml
 | 
					```yaml
 | 
				
			||||||
apiVersion: v1beta1
 | 
					apiVersion: v1beta3
 | 
				
			||||||
externalID: ${NODE_IP}
 | 
					 | 
				
			||||||
hostIP: ${NODE_IP}
 | 
					 | 
				
			||||||
id: ${NODE_IP}
 | 
					 | 
				
			||||||
kind: Node
 | 
					kind: Node
 | 
				
			||||||
resources:
 | 
					metadata:
 | 
				
			||||||
 | 
					  name: ${NODE_IP}
 | 
				
			||||||
 | 
					spec:
 | 
				
			||||||
 | 
					  externalID: ${NODE_IP}
 | 
				
			||||||
 | 
					status:
 | 
				
			||||||
 | 
					  # Fill in appropriate values below
 | 
				
			||||||
  capacity:
 | 
					  capacity:
 | 
				
			||||||
    # Adjust these to match your node
 | 
					 | 
				
			||||||
    cpu: "1"
 | 
					    cpu: "1"
 | 
				
			||||||
    memory: 3892043776
 | 
					    memory: 3Gi
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Make the API call to add the node, you should do this on the master node that you created above.  Otherwise you need to add ```-s=http://${MASTER_IP}:8080``` to point ```kubectl``` at the master.
 | 
					Make the API call to add the node, you should do this on the master node that you created above.  Otherwise you need to add ```-s=http://${MASTER_IP}:8080``` to point ```kubectl``` at the master.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user