Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e0f5956e
Commit
e0f5956e
authored
Dec 09, 2014
by
Joe Beda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make guestbook handle duplicate entries.
Also use kubernetes org on the Docker Hub to host the image. Fixes #2811
parent
90f71ea4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
README.md
examples/guestbook/README.md
+12
-12
frontend-controller.json
examples/guestbook/frontend-controller.json
+1
-1
index.html
examples/guestbook/php-redis/index.html
+1
-1
No files found.
examples/guestbook/README.md
View file @
e0f5956e
...
...
@@ -224,7 +224,7 @@ The pod is described in the file `examples/guestbook/frontend-controller.json`:
"id"
:
"frontendController"
,
"containers"
:
[{
"name"
:
"php-redis"
,
"image"
:
"
brendanburns/
php-redis"
,
"image"
:
"
kubernetes/example-guestbook-
php-redis"
,
"cpu"
:
100
,
"memory"
:
50000000
,
"ports"
:
[{
"containerPort"
:
80
,
"hostPort"
:
8000
}]
...
...
@@ -244,23 +244,23 @@ Using this file, you can turn up your frontend with:
```
shell
$
cluster/kubecfg.sh
-c
examples/guestbook/frontend-controller.json create replicationControllers
ID Image
(
s
)
Selector Replicas
----------
----------
----------
----------
frontendController
brendanburns/
php-redis
name
=
frontend 3
ID Image
(
s
)
Selector Replicas
----------
----------
----------
----------
frontendController
kubernetes/example-guestbook-
php-redis
name
=
frontend 3
```
Once that's up (it may take ten to thirty seconds to create the pods) you can list the pods in the cluster, to verify that the master, slaves and frontends are running:
```
shell
$
cluster/kubecfg.sh list pods
ID Image
(
s
)
Host Labels Status
----------
----------
----------
----------
----------
redis-master dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal
name
=
redis-master Running
e4469b52-70e7-11e4-9154-0800279696e1 brendanburns/redis-slave kubernetes-minion-3.c.briandpe-api.internal
name
=
redisslave,replicationController
=
redisSlaveController,uses
=
redis-master Running
e446dfc0-70e7-11e4-9154-0800279696e1 brendanburns/redis-slave kubernetes-minion-4.c.briandpe-api.internal
name
=
redisslave,replicationController
=
redisSlaveController,uses
=
redis-master Running
6b584847-70ee-11e4-9154-0800279696e1
brendanburns/
php-redis kubernetes-minion-3.c.briandpe-api.internal
name
=
frontend,replicationController
=
frontendController,uses
=
redisslave,redis-master Running
6b59e6d5-70ee-11e4-9154-0800279696e1
brendanburns/
php-redis kubernetes-minion-2.c.briandpe-api.internal
name
=
frontend,replicationController
=
frontendController,uses
=
redisslave,redis-master Running
6b57a25d-70ee-11e4-9154-0800279696e1
brendanburns/
php-redis kubernetes-minion-1.c.briandpe-api.internal
name
=
frontend,replicationController
=
frontendController,uses
=
redisslave,redis-master Running
ID Image
(
s
)
Host Labels Status
----------
----------
----------
----------
----------
redis-master dockerfile/redis
kubernetes-minion-3.c.briandpe-api.internal
name
=
redis-master Running
e4469b52-70e7-11e4-9154-0800279696e1 brendanburns/redis-slave
kubernetes-minion-3.c.briandpe-api.internal
name
=
redisslave,replicationController
=
redisSlaveController,uses
=
redis-master Running
e446dfc0-70e7-11e4-9154-0800279696e1 brendanburns/redis-slave
kubernetes-minion-4.c.briandpe-api.internal
name
=
redisslave,replicationController
=
redisSlaveController,uses
=
redis-master Running
6b584847-70ee-11e4-9154-0800279696e1
kubernetes/example-guestbook-
php-redis kubernetes-minion-3.c.briandpe-api.internal
name
=
frontend,replicationController
=
frontendController,uses
=
redisslave,redis-master Running
6b59e6d5-70ee-11e4-9154-0800279696e1
kubernetes/example-guestbook-
php-redis kubernetes-minion-2.c.briandpe-api.internal
name
=
frontend,replicationController
=
frontendController,uses
=
redisslave,redis-master Running
6b57a25d-70ee-11e4-9154-0800279696e1
kubernetes/example-guestbook-
php-redis kubernetes-minion-1.c.briandpe-api.internal
name
=
frontend,replicationController
=
frontendController,uses
=
redisslave,redis-master Running
```
You will see a single redis master pod, two redis slaves, and three frontend pods.
...
...
examples/guestbook/frontend-controller.json
View file @
e0f5956e
...
...
@@ -12,7 +12,7 @@
"id"
:
"frontendController"
,
"containers"
:
[{
"name"
:
"php-redis"
,
"image"
:
"
brendanburns/
php-redis"
,
"image"
:
"
kubernetes/example-guestbook-
php-redis"
,
"cpu"
:
100
,
"memory"
:
50000000
,
"ports"
:
[{
"containerPort"
:
80
,
"hostPort"
:
8000
}]
...
...
examples/guestbook/php-redis/index.html
View file @
e0f5956e
...
...
@@ -16,7 +16,7 @@
</fieldset>
</form>
<div>
<div
ng-repeat=
"msg in messages"
>
<div
ng-repeat=
"msg in messages
track by $index
"
>
{{msg}}
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment