Skip to content

Commit ada4de1

Browse files
committed
Updated Kubernetes Adapter (markdown)
1 parent 0bb7666 commit ada4de1

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Kubernetes-Adapter.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,31 @@ In this case the Kubernetes Adapter will create a Kubernetes Replication Control
167167
}
168168
}
169169

170+
The Replication Controller will do everything it can to ensure that exactly three instances of the WordPress service remain running at all times.
171+
172+
Whenever a Replication Controller is created, the Kubernetes Adapter will also create a Kubernetes Service to act as a proxy/load-balancer for the replicated Pod:
173+
174+
{
175+
"id":"wp",
176+
"apiVersion":"v1beta1",
177+
"kind":"Service",
178+
"port":8000,
179+
"labels":{
180+
"name":"wp"
181+
},
182+
"selector":{
183+
"name":"wp"
184+
},
185+
"containerPort":80
186+
}
187+
188+
With this Service in place any requests to port 8000 will be automatically load-balanced between the three WordPress pods being managed by the Replication Controller.
189+
170190
## Caveats
171191

172192
* Any volume configuration (either volumes mounted from the host or from other containers) defined in your application template will **not** translate to Kubernetes.
173193

174-
* Kubernetes allows only a narrow set of valid characters when naming pods, replication controllers and services. Names may only contain lowercase letters, numbers and the `-` (dash) character. In order to comply with the Kubernetes naming restrictions, the adapter will automatically alter the passed in service names -- all uppercase letters will be down-cased and any other dis-allowed characters will be substituted with a `-` (dash) character.
194+
* Kubernetes allows only a narrow set of valid characters when naming Pods, Replication Controllers and Services. Names may only contain lowercase letters, numbers and the `-` (dash) character. In order to comply with the Kubernetes naming restrictions, the adapter will automatically alter the passed in service names -- all uppercase letters will be down-cased and any other dis-allowed characters will be substituted with a `-` (dash) character.
175195

176196
* In order for container links to work, you must explicitly expose any ports that the linked-to container is listening on. When using container links locally Docker has the ability to inspect the image and see any exposed ports which were defined in the Dockerfile. With Kubernetes the linked containers may be on different nodes in the cluster so the exposed ports must be explicitly defined in the application template so that the Kubernetes Service can be properly configured.
177197

0 commit comments

Comments
 (0)