Stop using dockerfile/* images
As per http://blog.docker.com/2015/03/updates-available-to-popular-repos-update-your-images/ docker has stopped answering dockerfile/redis and dockerfile/nginx. Fix all users in our tree. Sadly this means a lot of published examples are now broken.
This commit is contained in:
@@ -47,7 +47,7 @@ The `kubectl.sh` line below spins up two containers running
|
||||
[Nginx](http://nginx.org/en/) running on port 80:
|
||||
|
||||
```bash
|
||||
cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
|
||||
cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=2 --port=80
|
||||
```
|
||||
|
||||
To stop the containers:
|
||||
@@ -82,7 +82,7 @@ Where pod.json contains something like:
|
||||
"id": "php",
|
||||
"containers": [{
|
||||
"name": "nginx",
|
||||
"image": "dockerfile/nginx",
|
||||
"image": "nginx",
|
||||
"ports": [{
|
||||
"containerPort": 80,
|
||||
"hostPort": 8081
|
||||
|
@@ -46,7 +46,7 @@ The `kubectl.sh` line below spins up two containers running
|
||||
[Nginx](http://nginx.org/en/) running on port 80:
|
||||
|
||||
```bash
|
||||
cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
|
||||
cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=2 --port=80
|
||||
```
|
||||
|
||||
To stop the containers:
|
||||
@@ -85,7 +85,7 @@ Where pod.json contains something like:
|
||||
"id": "php",
|
||||
"containers": [{
|
||||
"name": "nginx",
|
||||
"image": "dockerfile/nginx",
|
||||
"image": "nginx",
|
||||
"ports": [{
|
||||
"containerPort": 80,
|
||||
"hostPort": 8080
|
||||
|
@@ -80,7 +80,7 @@ POD IP CONTAINER(S) IMAGE(S)
|
||||
frontend-controller-0133o 10.2.1.14 php-redis kubernetes/example-guestbook-php-redis kube-01/172.18.0.13 name=frontend,uses=redisslave,redis-master Running
|
||||
frontend-controller-ls6k1 10.2.3.10 php-redis kubernetes/example-guestbook-php-redis <unassigned> name=frontend,uses=redisslave,redis-master Running
|
||||
frontend-controller-oh43e 10.2.2.15 php-redis kubernetes/example-guestbook-php-redis kube-02/172.18.0.14 name=frontend,uses=redisslave,redis-master Running
|
||||
redis-master 10.2.1.3 master dockerfile/redis kube-01/172.18.0.13 name=redis-master Running
|
||||
redis-master 10.2.1.3 master redis kube-01/172.18.0.13 name=redis-master Running
|
||||
redis-slave-controller-fplln 10.2.2.3 slave brendanburns/redis-slave kube-02/172.18.0.14 name=redisslave,uses=redis-master Running
|
||||
redis-slave-controller-gziey 10.2.1.4 slave brendanburns/redis-slave kube-01/172.18.0.13 name=redisslave,uses=redis-master Running
|
||||
|
||||
|
@@ -606,7 +606,7 @@ On the Kubernetes Master node lets create a '''nginx.yml'''
|
||||
id: www
|
||||
containers:
|
||||
- name: nginx
|
||||
image: dockerfile/nginx
|
||||
image: nginx
|
||||
|
||||
|
||||
Now for the service: ```nginx-service.yml```
|
||||
|
@@ -52,7 +52,7 @@ The `kubectl.sh` line below spins up two containers running
|
||||
[Nginx](http://nginx.org/en/) running on port 80:
|
||||
|
||||
```bash
|
||||
cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
|
||||
cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=2 --port=80
|
||||
```
|
||||
|
||||
To stop the containers:
|
||||
@@ -87,7 +87,7 @@ Where pod.json contains something like:
|
||||
"id": "php",
|
||||
"containers": [{
|
||||
"name": "nginx",
|
||||
"image": "dockerfile/nginx",
|
||||
"image": "nginx",
|
||||
"ports": [{
|
||||
"containerPort": 80,
|
||||
"hostPort": 8081
|
||||
|
@@ -47,12 +47,12 @@ You can now use any of the cluster/kubectl.sh commands to interact with your loc
|
||||
cluster/kubectl.sh get pods
|
||||
cluster/kubectl.sh get services
|
||||
cluster/kubectl.sh get replicationControllers
|
||||
cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=2 --port=80
|
||||
cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=2 --port=80
|
||||
|
||||
|
||||
## begin wait for provision to complete, you can monitor the docker pull by opening a new terminal
|
||||
sudo docker images
|
||||
## you should see it pulling the dockerfile/nginx image, once the above command returns it
|
||||
## you should see it pulling the nginx image, once the above command returns it
|
||||
sudo docker ps
|
||||
## you should see your container running!
|
||||
exit
|
||||
|
@@ -141,7 +141,7 @@ $ cat <<EOPOD >nginx.json
|
||||
"version": "v1beta1",
|
||||
"containers": [{
|
||||
"name": "nginx-01",
|
||||
"image": "dockerfile/nginx",
|
||||
"image": "nginx",
|
||||
"ports": [{
|
||||
"containerPort": 80,
|
||||
"hostPort": 31000
|
||||
@@ -177,7 +177,7 @@ We can use the `kubectl` interface to monitor the status of our pod:
|
||||
```bash
|
||||
$ bin/kubectl get pods
|
||||
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS
|
||||
nginx-id-01 172.17.5.27 nginx-01 dockerfile/nginx 10.72.72.178/10.72.72.178 cluster=gce,name=foo Running
|
||||
nginx-id-01 172.17.5.27 nginx-01 nginx 10.72.72.178/10.72.72.178 cluster=gce,name=foo Running
|
||||
```
|
||||
|
||||
Verify that the pod task is running in the Mesos web GUI. Click on the
|
||||
|
@@ -8,7 +8,7 @@
|
||||
"id": "php",
|
||||
"containers": [{
|
||||
"name": "nginx",
|
||||
"image": "dockerfile/nginx",
|
||||
"image": "nginx",
|
||||
"ports": [{
|
||||
"containerPort": 80,
|
||||
"hostPort": 8081
|
||||
|
@@ -187,7 +187,7 @@ NAME IMAGE(S SELECTOR REPLICAS
|
||||
Start a container running nginx with a replication controller and three replicas
|
||||
|
||||
```
|
||||
$ cluster/kubectl.sh run-container my-nginx --image=dockerfile/nginx --replicas=3 --port=80
|
||||
$ cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=3 --port=80
|
||||
```
|
||||
|
||||
When listing the pods, you will see that three containers have been started and are in Waiting state:
|
||||
@@ -195,9 +195,9 @@ When listing the pods, you will see that three containers have been started and
|
||||
```
|
||||
$ cluster/kubectl.sh get pods
|
||||
NAME IMAGE(S) HOST LABELS STATUS
|
||||
781191ff-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.4/10.245.2.4 name=myNginx Waiting
|
||||
7813c8bd-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.2/10.245.2.2 name=myNginx Waiting
|
||||
78140853-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.3/10.245.2.3 name=myNginx Waiting
|
||||
781191ff-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.4/10.245.2.4 name=myNginx Waiting
|
||||
7813c8bd-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.2/10.245.2.2 name=myNginx Waiting
|
||||
78140853-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.3/10.245.2.3 name=myNginx Waiting
|
||||
```
|
||||
|
||||
You need to wait for the provisioning to complete, you can monitor the minions by doing:
|
||||
@@ -217,7 +217,7 @@ Once the docker image for nginx has been downloaded, the container will start an
|
||||
$ sudo salt '*minion-1' cmd.run 'docker ps'
|
||||
kubernetes-minion-1:
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
dbe79bf6e25b dockerfile/nginx:latest "nginx" 21 seconds ago Up 19 seconds k8s--mynginx.8c5b8a3a--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1.etcd--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1--fcfa837f
|
||||
dbe79bf6e25b nginx:latest "nginx" 21 seconds ago Up 19 seconds k8s--mynginx.8c5b8a3a--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1.etcd--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1--fcfa837f
|
||||
fa0e29c94501 kubernetes/pause:latest "/pause" 8 minutes ago Up 8 minutes 0.0.0.0:8080->80/tcp k8s--net.a90e7ce4--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1.etcd--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1--baf5b21b
|
||||
aa2ee3ed844a google/cadvisor:latest "/usr/bin/cadvisor - 38 minutes ago Up 38 minutes k8s--cadvisor.9e90d182--cadvisor_-_agent.file--4626b3a2
|
||||
65a3a926f357 kubernetes/pause:latest "/pause" 39 minutes ago Up 39 minutes 0.0.0.0:4194->8080/tcp k8s--net.c5ba7f0e--cadvisor_-_agent.file--342fd561
|
||||
@@ -228,16 +228,16 @@ Going back to listing the pods, services and replicationControllers, you now hav
|
||||
```
|
||||
$ cluster/kubectl.sh get pods
|
||||
NAME IMAGE(S) HOST LABELS STATUS
|
||||
781191ff-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.4/10.245.2.4 name=myNginx Running
|
||||
7813c8bd-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.2/10.245.2.2 name=myNginx Running
|
||||
78140853-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.3/10.245.2.3 name=myNginx Running
|
||||
781191ff-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.4/10.245.2.4 name=myNginx Running
|
||||
7813c8bd-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.2/10.245.2.2 name=myNginx Running
|
||||
78140853-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.3/10.245.2.3 name=myNginx Running
|
||||
|
||||
$ cluster/kubectl.sh get services
|
||||
NAME LABELS SELECTOR IP PORT
|
||||
|
||||
$ cluster/kubectl.sh get replicationControllers
|
||||
NAME IMAGE(S SELECTOR REPLICAS
|
||||
myNginx dockerfile/nginx name=my-nginx 3
|
||||
myNginx nginx name=my-nginx 3
|
||||
```
|
||||
|
||||
We did not start any services, hence there are none listed. But we see three replicas displayed properly.
|
||||
@@ -248,8 +248,8 @@ You can already play with resizing the replicas with:
|
||||
$ cluster/kubectl.sh resize rc my-nginx --replicas=2
|
||||
$ cluster/kubectl.sh get pods
|
||||
NAME IMAGE(S) HOST LABELS STATUS
|
||||
7813c8bd-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.2/10.245.2.2 name=myNginx Running
|
||||
78140853-3ffe-11e4-9036-0800279696e1 dockerfile/nginx 10.245.2.3/10.245.2.3 name=myNginx Running
|
||||
7813c8bd-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.2/10.245.2.2 name=myNginx Running
|
||||
78140853-3ffe-11e4-9036-0800279696e1 nginx 10.245.2.3/10.245.2.3 name=myNginx Running
|
||||
```
|
||||
|
||||
Congratulations!
|
||||
|
Reference in New Issue
Block a user