Merge branch 'master' into all-user-doc
This commit is contained in:
+1
-1
@@ -33,4 +33,4 @@ Note that code issues should be filed against the main kubernetes repository, wh
|
|||||||
|
|
||||||
### Submitting Documentation Pull Requests
|
### Submitting Documentation Pull Requests
|
||||||
|
|
||||||
If you’re fixing an issue in the existing documentation, you should submit a PR against the master branch. Follow [these instructions to create a documentation pull request against the kubernetes.io repository](http://kubernetes.io/docs/contribute/create-pull-request/).
|
If you're fixing an issue in the existing documentation, you should submit a PR against the master branch. Follow [these instructions to create a documentation pull request against the kubernetes.io repository](http://kubernetes.io/docs/contribute/create-pull-request/).
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ Section 8 -- Interpretation.
|
|||||||
Creative Commons is not a party to its public
|
Creative Commons is not a party to its public
|
||||||
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||||
its public licenses to material it publishes and in those instances
|
its public licenses to material it publishes and in those instances
|
||||||
will be considered the “Licensor.” The text of the Creative Commons
|
will be considered the "Licensor." The text of the Creative Commons
|
||||||
public licenses is dedicated to the public domain under the CC0 Public
|
public licenses is dedicated to the public domain under the CC0 Public
|
||||||
Domain Dedication. Except for the limited purpose of indicating that
|
Domain Dedication. Except for the limited purpose of indicating that
|
||||||
material is shared under a Creative Commons public license or as
|
material is shared under a Creative Commons public license or as
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ You can click the **Fork** button in the upper-right area of the screen to creat
|
|||||||
|
|
||||||
For more information about contributing to the Kubernetes documentation, see:
|
For more information about contributing to the Kubernetes documentation, see:
|
||||||
|
|
||||||
* [Contributing to the kubernetes Documentation](http://kubernetes.io/editdocs/)
|
* [Contributing to the Kubernetes Documentation](http://kubernetes.io/editdocs/)
|
||||||
* [Creating a Documentation Pull Request](http://kubernetes.io/docs/contribute/create-pull-request/)
|
* [Creating a Documentation Pull Request](http://kubernetes.io/docs/contribute/create-pull-request/)
|
||||||
* [Writing a New Topic](http://kubernetes.io/docs/contribute/write-new-topic/)
|
* [Writing a New Topic](http://kubernetes.io/docs/contribute/write-new-topic/)
|
||||||
* [Staging Your Documentation Changes](http://kubernetes.io/docs/contribute/stage-documentation-changes/)
|
* [Staging Your Documentation Changes](http://kubernetes.io/docs/contribute/stage-documentation-changes/)
|
||||||
|
|||||||
@@ -54,9 +54,18 @@ toc:
|
|||||||
- docs/user-guide/kubectl/kubectl_apply.md
|
- docs/user-guide/kubectl/kubectl_apply.md
|
||||||
- docs/user-guide/kubectl/kubectl_attach.md
|
- docs/user-guide/kubectl/kubectl_attach.md
|
||||||
- docs/user-guide/kubectl/kubectl_autoscale.md
|
- docs/user-guide/kubectl/kubectl_autoscale.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_certificate.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_certificate_approve.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_certificate_deny.md
|
||||||
- docs/user-guide/kubectl/kubectl_cluster-info.md
|
- docs/user-guide/kubectl/kubectl_cluster-info.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_cluster-info_dump.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_completion.md
|
||||||
- docs/user-guide/kubectl/kubectl_config.md
|
- docs/user-guide/kubectl/kubectl_config.md
|
||||||
- docs/user-guide/kubectl/kubectl_config_current-context.md
|
- docs/user-guide/kubectl/kubectl_config_current-context.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_config_delete-cluster.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_config_delete-context.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_config_get-clusters.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_config_get-contexts.md
|
||||||
- docs/user-guide/kubectl/kubectl_config_set-cluster.md
|
- docs/user-guide/kubectl/kubectl_config_set-cluster.md
|
||||||
- docs/user-guide/kubectl/kubectl_config_set-context.md
|
- docs/user-guide/kubectl/kubectl_config_set-context.md
|
||||||
- docs/user-guide/kubectl/kubectl_config_set-credentials.md
|
- docs/user-guide/kubectl/kubectl_config_set-credentials.md
|
||||||
@@ -66,13 +75,20 @@ toc:
|
|||||||
- docs/user-guide/kubectl/kubectl_config_view.md
|
- docs/user-guide/kubectl/kubectl_config_view.md
|
||||||
- docs/user-guide/kubectl/kubectl_convert.md
|
- docs/user-guide/kubectl/kubectl_convert.md
|
||||||
- docs/user-guide/kubectl/kubectl_cordon.md
|
- docs/user-guide/kubectl/kubectl_cordon.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_cp.md
|
||||||
- docs/user-guide/kubectl/kubectl_create.md
|
- docs/user-guide/kubectl/kubectl_create.md
|
||||||
- docs/user-guide/kubectl/kubectl_create_configmap.md
|
- docs/user-guide/kubectl/kubectl_create_configmap.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_create_deployment.md
|
||||||
- docs/user-guide/kubectl/kubectl_create_namespace.md
|
- docs/user-guide/kubectl/kubectl_create_namespace.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_create_quota.md
|
||||||
- docs/user-guide/kubectl/kubectl_create_secret_docker-registry.md
|
- docs/user-guide/kubectl/kubectl_create_secret_docker-registry.md
|
||||||
- docs/user-guide/kubectl/kubectl_create_secret.md
|
- docs/user-guide/kubectl/kubectl_create_secret.md
|
||||||
- docs/user-guide/kubectl/kubectl_create_secret_generic.md
|
- docs/user-guide/kubectl/kubectl_create_secret_generic.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_create_secret_tls.md
|
||||||
- docs/user-guide/kubectl/kubectl_create_serviceaccount.md
|
- docs/user-guide/kubectl/kubectl_create_serviceaccount.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_create_service_clusterip.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_create_service_loadbalancer.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_create_service_nodeport.md
|
||||||
- docs/user-guide/kubectl/kubectl_delete.md
|
- docs/user-guide/kubectl/kubectl_delete.md
|
||||||
- docs/user-guide/kubectl/kubectl_describe.md
|
- docs/user-guide/kubectl/kubectl_describe.md
|
||||||
- docs/user-guide/kubectl/kubectl_drain.md
|
- docs/user-guide/kubectl/kubectl_drain.md
|
||||||
@@ -83,6 +99,7 @@ toc:
|
|||||||
- docs/user-guide/kubectl/kubectl_get.md
|
- docs/user-guide/kubectl/kubectl_get.md
|
||||||
- docs/user-guide/kubectl/kubectl_label.md
|
- docs/user-guide/kubectl/kubectl_label.md
|
||||||
- docs/user-guide/kubectl/kubectl_logs.md
|
- docs/user-guide/kubectl/kubectl_logs.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_options.md
|
||||||
- docs/user-guide/kubectl/kubectl_patch.md
|
- docs/user-guide/kubectl/kubectl_patch.md
|
||||||
- docs/user-guide/kubectl/kubectl_port-forward.md
|
- docs/user-guide/kubectl/kubectl_port-forward.md
|
||||||
- docs/user-guide/kubectl/kubectl_proxy.md
|
- docs/user-guide/kubectl/kubectl_proxy.md
|
||||||
@@ -92,9 +109,17 @@ toc:
|
|||||||
- docs/user-guide/kubectl/kubectl_rollout_history.md
|
- docs/user-guide/kubectl/kubectl_rollout_history.md
|
||||||
- docs/user-guide/kubectl/kubectl_rollout_pause.md
|
- docs/user-guide/kubectl/kubectl_rollout_pause.md
|
||||||
- docs/user-guide/kubectl/kubectl_rollout_resume.md
|
- docs/user-guide/kubectl/kubectl_rollout_resume.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_rollout_status.md
|
||||||
- docs/user-guide/kubectl/kubectl_rollout_undo.md
|
- docs/user-guide/kubectl/kubectl_rollout_undo.md
|
||||||
- docs/user-guide/kubectl/kubectl_run.md
|
- docs/user-guide/kubectl/kubectl_run.md
|
||||||
- docs/user-guide/kubectl/kubectl_scale.md
|
- docs/user-guide/kubectl/kubectl_scale.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_set.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_set_image.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_set_resources.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_taint.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_top.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_top_node.md
|
||||||
|
- docs/user-guide/kubectl/kubectl_top_pod.md
|
||||||
- docs/user-guide/kubectl/kubectl_uncordon.md
|
- docs/user-guide/kubectl/kubectl_uncordon.md
|
||||||
- docs/user-guide/kubectl/kubectl_version.md
|
- docs/user-guide/kubectl/kubectl_version.md
|
||||||
- title: Superseded and Deprecated Commands
|
- title: Superseded and Deprecated Commands
|
||||||
|
|||||||
@@ -2,3 +2,20 @@ bigheader: "Tools"
|
|||||||
abstract: "Tools to help you use and enhance Kubernetes."
|
abstract: "Tools to help you use and enhance Kubernetes."
|
||||||
toc:
|
toc:
|
||||||
- docs/tools/index.md
|
- docs/tools/index.md
|
||||||
|
|
||||||
|
- title: Native Tools
|
||||||
|
section:
|
||||||
|
- title: Kubectl
|
||||||
|
path: /docs/user-guide/kubectl/
|
||||||
|
- title: Kubefed
|
||||||
|
path: /docs/admin/federation/kubefed/
|
||||||
|
- title: Kubernetes Dashboard
|
||||||
|
path: /docs/user-guide/ui/
|
||||||
|
|
||||||
|
- title: Third-Party Tools
|
||||||
|
section:
|
||||||
|
- title: Helm
|
||||||
|
path: https://github.com/kubernetes/helm
|
||||||
|
- title: Kompose
|
||||||
|
path: https://github.com/kubernetes-incubator/kompose
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ toc:
|
|||||||
- docs/tutorials/kubernetes-basics/update-interactive.html
|
- docs/tutorials/kubernetes-basics/update-interactive.html
|
||||||
- title: Stateless Applications
|
- title: Stateless Applications
|
||||||
section:
|
section:
|
||||||
|
- docs/tutorials/stateless-application/hello-minikube.md
|
||||||
- docs/tutorials/stateless-application/run-stateless-application-deployment.md
|
- docs/tutorials/stateless-application/run-stateless-application-deployment.md
|
||||||
- docs/tutorials/stateless-application/expose-external-ip-address-service.md
|
- docs/tutorials/stateless-application/expose-external-ip-address-service.md
|
||||||
- docs/tutorials/stateless-application/expose-external-ip-address.md
|
- docs/tutorials/stateless-application/expose-external-ip-address.md
|
||||||
|
|||||||
+1
-2
@@ -11,7 +11,6 @@
|
|||||||
{% if item.path %}
|
{% if item.path %}
|
||||||
{% assign path = item.path %}
|
{% assign path = item.path %}
|
||||||
{% assign title = item.title %}
|
{% assign title = item.title %}
|
||||||
{% assign target = " target='_blank'" %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% assign page = site.pages | where: "path", item | first %}
|
{% assign page = site.pages | where: "path", item | first %}
|
||||||
{% assign title = page.title %}
|
{% assign title = page.title %}
|
||||||
@@ -20,7 +19,7 @@
|
|||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% if path %}
|
{% if path %}
|
||||||
<a class="item" data-title="{{ title }}" href="{{ path }}"{{ target }}></a>
|
<a class="item" data-title="{{ title }}" href="{{ path }}"></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -2079,7 +2079,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_v1_flexvolumesource">v1.FlexVolumeSource</h3>
|
<h3 id="_v1_flexvolumesource">v1.FlexVolumeSource</h3>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<p>FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.</p>
|
<p>FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.</p>
|
||||||
</div>
|
</div>
|
||||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@@ -2535,7 +2535,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">flexVolume</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">flexVolume</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_flexvolumesource">v1.FlexVolumeSource</a></p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_flexvolumesource">v1.FlexVolumeSource</a></p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
@@ -5867,7 +5867,7 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is a extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
|
|||||||
@@ -5578,7 +5578,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_a_ingress">create a Ingress</h3>
|
<h3 id="_create_a_ingress">create an Ingress</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /apis/extensions/v1beta1/namespaces/{namespace}/ingresses</pre>
|
<pre>POST /apis/extensions/v1beta1/namespaces/{namespace}/ingresses</pre>
|
||||||
@@ -5959,7 +5959,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_delete_a_ingress">delete a Ingress</h3>
|
<h3 id="_delete_a_ingress">delete an Ingress</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>DELETE /apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}</pre>
|
<pre>DELETE /apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}</pre>
|
||||||
|
|||||||
@@ -2560,7 +2560,7 @@ The resulting set of endpoints can be viewed as:<br>
|
|||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_v1_flexvolumesource">v1.FlexVolumeSource</h3>
|
<h3 id="_v1_flexvolumesource">v1.FlexVolumeSource</h3>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<p>FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.</p>
|
<p>FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.</p>
|
||||||
</div>
|
</div>
|
||||||
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
<table class="tableblock frame-all grid-all" style="width:100%; ">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@@ -3268,7 +3268,7 @@ The resulting set of endpoints can be viewed as:<br>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">flexVolume</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">flexVolume</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_flexvolumesource">v1.FlexVolumeSource</a></p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_flexvolumesource">v1.FlexVolumeSource</a></p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
@@ -5555,7 +5555,7 @@ The resulting set of endpoints can be viewed as:<br>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">flexVolume</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">flexVolume</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">FlexVolume represents a generic volume resource that is provisioned/attached using a exec based plugin. This is an alpha feature and may change in future.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_flexvolumesource">v1.FlexVolumeSource</a></p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="#_v1_flexvolumesource">v1.FlexVolumeSource</a></p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
|
|||||||
@@ -2676,7 +2676,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_a_endpoints">create a Endpoints</h3>
|
<h3 id="_create_a_endpoints">create an Endpoints</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /api/v1/namespaces/{namespace}/endpoints</pre>
|
<pre>POST /api/v1/namespaces/{namespace}/endpoints</pre>
|
||||||
@@ -3057,7 +3057,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_delete_a_endpoints">delete a Endpoints</h3>
|
<h3 id="_delete_a_endpoints">delete an Endpoints</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>DELETE /api/v1/namespaces/{namespace}/endpoints/{name}</pre>
|
<pre>DELETE /api/v1/namespaces/{namespace}/endpoints/{name}</pre>
|
||||||
@@ -3619,7 +3619,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_a_event">create a Event</h3>
|
<h3 id="_create_a_event">create an Event</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /api/v1/namespaces/{namespace}/events</pre>
|
<pre>POST /api/v1/namespaces/{namespace}/events</pre>
|
||||||
@@ -4000,7 +4000,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_delete_a_event">delete a Event</h3>
|
<h3 id="_delete_a_event">delete an Event</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>DELETE /api/v1/namespaces/{namespace}/events/{name}</pre>
|
<pre>DELETE /api/v1/namespaces/{namespace}/events/{name}</pre>
|
||||||
|
|||||||
@@ -6054,7 +6054,7 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e. this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
|
|||||||
@@ -5578,7 +5578,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_a_ingress">create a Ingress</h3>
|
<h3 id="_create_a_ingress">create an Ingress</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /apis/extensions/v1beta1/namespaces/{namespace}/ingresses</pre>
|
<pre>POST /apis/extensions/v1beta1/namespaces/{namespace}/ingresses</pre>
|
||||||
@@ -5959,7 +5959,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_delete_a_ingress">delete a Ingress</h3>
|
<h3 id="_delete_a_ingress">delete an Ingress</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>DELETE /apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}</pre>
|
<pre>DELETE /apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}</pre>
|
||||||
|
|||||||
@@ -2676,7 +2676,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_a_endpoints">create a Endpoints</h3>
|
<h3 id="_create_a_endpoints">create an Endpoints</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /api/v1/namespaces/{namespace}/endpoints</pre>
|
<pre>POST /api/v1/namespaces/{namespace}/endpoints</pre>
|
||||||
@@ -3057,7 +3057,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_delete_a_endpoints">delete a Endpoints</h3>
|
<h3 id="_delete_a_endpoints">delete an Endpoints</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>DELETE /api/v1/namespaces/{namespace}/endpoints/{name}</pre>
|
<pre>DELETE /api/v1/namespaces/{namespace}/endpoints/{name}</pre>
|
||||||
@@ -3619,7 +3619,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_a_event">create a Event</h3>
|
<h3 id="_create_a_event">create an Event</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /api/v1/namespaces/{namespace}/events</pre>
|
<pre>POST /api/v1/namespaces/{namespace}/events</pre>
|
||||||
@@ -4000,7 +4000,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_delete_a_event">delete a Event</h3>
|
<h3 id="_delete_a_event">delete an Event</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>DELETE /api/v1/namespaces/{namespace}/events/{name}</pre>
|
<pre>DELETE /api/v1/namespaces/{namespace}/events/{name}</pre>
|
||||||
@@ -7885,7 +7885,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sect2">
|
<div class="sect2">
|
||||||
<h3 id="_create_eviction_of_a_eviction">create eviction of a Eviction</h3>
|
<h3 id="_create_eviction_of_a_eviction">create eviction of an Eviction</h3>
|
||||||
<div class="listingblock">
|
<div class="listingblock">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<pre>POST /api/v1/namespaces/{namespace}/pods/{name}/eviction</pre>
|
<pre>POST /api/v1/namespaces/{namespace}/pods/{name}/eviction</pre>
|
||||||
|
|||||||
@@ -6316,7 +6316,7 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e. this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
|
|||||||
@@ -17,19 +17,19 @@ title: Case Studies
|
|||||||
<div class="case-studies">
|
<div class="case-studies">
|
||||||
<div class="case-study">
|
<div class="case-study">
|
||||||
<img src="/images/case_studies/pearson.png" alt="Pearson">
|
<img src="/images/case_studies/pearson.png" alt="Pearson">
|
||||||
<p class="quote">“We chose Kubernetes because of its flexibility, ease of management and the way it improves our engineers’ productivity.”</p>
|
<p class="quote">"We chose Kubernetes because of its flexibility, ease of management and the way it improves our engineers' productivity."</p>
|
||||||
<!--<p class="attrib">— Chris Jackson, Director for Cloud Product Engineering, Pearson</p>-->
|
<!--<p class="attrib">— Chris Jackson, Director for Cloud Product Engineering, Pearson</p>-->
|
||||||
<a href="./pearson/">Read about Pearson</a>
|
<a href="./pearson/">Read about Pearson</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="case-study">
|
<div class="case-study">
|
||||||
<img src="/images/case_studies/wikimedia.png" alt="Wikimedia">
|
<img src="/images/case_studies/wikimedia.png" alt="Wikimedia">
|
||||||
<p class="quote">“With Kubernetes, we’re simplifying our environment and making it easier for developers to build the tools that make wikis run better.”</p>
|
<p class="quote">"With Kubernetes, we're simplifying our environment and making it easier for developers to build the tools that make wikis run better."</p>
|
||||||
<!--<p class="attrib">— Yuvi Panda, Operations Engineer, Wikimedia Foundation</p>-->
|
<!--<p class="attrib">— Yuvi Panda, Operations Engineer, Wikimedia Foundation</p>-->
|
||||||
<a href="./wikimedia/">Read about Wikimedia</a>
|
<a href="./wikimedia/">Read about Wikimedia</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="case-study">
|
<div class="case-study">
|
||||||
<img src="/images/case_studies/ebay.png" alt="eBay">
|
<img src="/images/case_studies/ebay.png" alt="eBay">
|
||||||
<p class="quote">Inside eBay’s shift to Kubernetes and containers atop OpenStack</p>
|
<p class="quote">Inside eBay's shift to Kubernetes and containers atop OpenStack</p>
|
||||||
<a href="http://www.nextplatform.com/2015/11/12/inside-ebays-shift-to-kubernetes-and-containers-atop-openstack/">Read about eBay</a>
|
<a href="http://www.nextplatform.com/2015/11/12/inside-ebays-shift-to-kubernetes-and-containers-atop-openstack/">Read about eBay</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="case-study">
|
<div class="case-study">
|
||||||
@@ -45,7 +45,7 @@ title: Case Studies
|
|||||||
<section id="video">
|
<section id="video">
|
||||||
<main>
|
<main>
|
||||||
<!--<div>-->
|
<!--<div>-->
|
||||||
<!--<h3>“I don’t want to deploy software the old way ever again”</h3>-->
|
<!--<h3>"I don't want to deploy software the old way ever again"</h3>-->
|
||||||
<!--<p class="attrib">— Dylan Carney, Lead Software Engineer, Zulily</p>-->
|
<!--<p class="attrib">— Dylan Carney, Lead Software Engineer, Zulily</p>-->
|
||||||
<!--<img src="/images/case_studies/zulily.png" id="zulilyLogo" alt="zulily">-->
|
<!--<img src="/images/case_studies/zulily.png" id="zulilyLogo" alt="zulily">-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
|
|||||||
+10
-10
@@ -13,13 +13,13 @@ title: Pearson Case Study
|
|||||||
<section id="mainContent">
|
<section id="mainContent">
|
||||||
<main>
|
<main>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h3 id="caseStudyTitle">Using Kubernetes to reinvent the world’s largest educational company</h3>
|
<h3 id="caseStudyTitle">Using Kubernetes to reinvent the world's largest educational company</h3>
|
||||||
<p>
|
<p>
|
||||||
Pearson, the world’s education company, serving 75 million learners worldwide, set a goal to more than double that number to 200 million by 2025. A key part of this growth is in digital learning experiences, and that requires an infrastructure platform that is able to scale quickly and deliver products to market faster. So Pearson’s Cloud Technology team chose Kubernetes to help build a platform to meet the business requirements. </p>
|
Pearson, the world's education company, serving 75 million learners worldwide, set a goal to more than double that number to 200 million by 2025. A key part of this growth is in digital learning experiences, and that requires an infrastructure platform that is able to scale quickly and deliver products to market faster. So Pearson's Cloud Technology team chose Kubernetes to help build a platform to meet the business requirements. </p>
|
||||||
<div class="feature">
|
<div class="feature">
|
||||||
<img src="/images/case_studies/pearson.png" alt="Pearson">
|
<img src="/images/case_studies/pearson.png" alt="Pearson">
|
||||||
<p class="quote">
|
<p class="quote">
|
||||||
“To transform our infrastructure, we had to think beyond simply enabling automated provisioning, we realized we had to build a platform that would allow Pearson developers to build manage and deploy applications in a completely different way. We chose Kubernetes because of its flexibility, ease of management and the way it would improve our engineers’ productivity.” </p>
|
"To transform our infrastructure, we had to think beyond simply enabling automated provisioning, we realized we had to build a platform that would allow Pearson developers to build manage and deploy applications in a completely different way. We chose Kubernetes because of its flexibility, ease of management and the way it would improve our engineers' productivity." </p>
|
||||||
<p class="attrib">— Chris Jackson, Director for Cloud Product Engineering, Pearson</p>
|
<p class="attrib">— Chris Jackson, Director for Cloud Product Engineering, Pearson</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,7 +38,7 @@ title: Pearson Case Study
|
|||||||
<div class="bullet">
|
<div class="bullet">
|
||||||
<h4>Why Kubernetes:</h4>
|
<h4>Why Kubernetes:</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Kubernetes will allow Pearson’s teams to develop their apps in a consistent manner, saving time and minimizing complexity.</li>
|
<li>Kubernetes will allow Pearson's teams to develop their apps in a consistent manner, saving time and minimizing complexity.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="bullet">
|
<div class="bullet">
|
||||||
@@ -52,7 +52,7 @@ title: Pearson Case Study
|
|||||||
<div class="bullet">
|
<div class="bullet">
|
||||||
<h4>Results:</h4>
|
<h4>Results:</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Pearson is building an enterprise-wide platform for delivering innovative, web-based educational content. They expect engineers’ productivity to increase by up to 20 percent.</li>
|
<li>Pearson is building an enterprise-wide platform for delivering innovative, web-based educational content. They expect engineers' productivity to increase by up to 20 percent.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,9 +63,9 @@ title: Pearson Case Study
|
|||||||
<main>
|
<main>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>Kubernetes powers a comprehensive developer experience</h4>
|
<h4>Kubernetes powers a comprehensive developer experience</h4>
|
||||||
<p>Pearson wanted to use as much open source technology as possible for the platform given that it provides both technical and commercial benefits over the duration of the project. Jackson says, “Building an infrastructure platform based on open source technology in Pearson was a no-brainer, the sharing of technical challenges and advanced use cases in a community of people with talent far beyond what we could hire independently allows us to innovate at a level we could not reach on our own. Our engineers enjoy returning code to the community and participating in talks, blogs and meetings, it’s a great way for us to allow our team to express themselves and share the pride they have in their work.”</p>
|
<p>Pearson wanted to use as much open source technology as possible for the platform given that it provides both technical and commercial benefits over the duration of the project. Jackson says, "Building an infrastructure platform based on open source technology in Pearson was a no-brainer, the sharing of technical challenges and advanced use cases in a community of people with talent far beyond what we could hire independently allows us to innovate at a level we could not reach on our own. Our engineers enjoy returning code to the community and participating in talks, blogs and meetings, it's a great way for us to allow our team to express themselves and share the pride they have in their work."</p>
|
||||||
<p>It also wanted to use a container-focused platform. Pearson has 400 development groups and diverse brands with varying business and technical needs. With containers, each brand could experiment with building new types of content using their preferred technologies, and then deliver it using containers. Pearson chose Kubernetes because it believes that is the best technology for managing containers, has the widest community support and offers the most flexible and powerful tools.“</p>
|
<p>It also wanted to use a container-focused platform. Pearson has 400 development groups and diverse brands with varying business and technical needs. With containers, each brand could experiment with building new types of content using their preferred technologies, and then deliver it using containers. Pearson chose Kubernetes because it believes that is the best technology for managing containers, has the widest community support and offers the most flexible and powerful tools."</p>
|
||||||
<p>Kubernetes is at the core of the platform we’ve built for developers. After we get our big spike in back-to-school in traffic, much of Pearson’s traffic will interact with Kubernetes. It is proving to be as effective as we had hoped,” Jackson says.</p>
|
<p>Kubernetes is at the core of the platform we've built for developers. After we get our big spike in back-to-school in traffic, much of Pearson's traffic will interact with Kubernetes. It is proving to be as effective as we had hoped," Jackson says.</p>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</section>
|
</section>
|
||||||
@@ -74,9 +74,9 @@ title: Pearson Case Study
|
|||||||
<main>
|
<main>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>Encouraging experimentation, saving engineers time</h4>
|
<h4>Encouraging experimentation, saving engineers time</h4>
|
||||||
<p>With the new platform, Pearson will increase stability and performance, and to bring products to market more quickly. The company says its engineers will also get a productivity boost because they won’t spend time managing infrastructure. Jackson estimates 15 to 20 percent in productivity savings.</p>
|
<p>With the new platform, Pearson will increase stability and performance, and to bring products to market more quickly. The company says its engineers will also get a productivity boost because they won't spend time managing infrastructure. Jackson estimates 15 to 20 percent in productivity savings.</p>
|
||||||
<p>Beyond that, Pearson says the platform will encourage innovation because of the ease with which new applications can be developed, and because applications will be deployed far more quickly than in the past. It expects that will help the company meet its goal of reaching 200 million learners within the next 10 years.</p>
|
<p>Beyond that, Pearson says the platform will encourage innovation because of the ease with which new applications can be developed, and because applications will be deployed far more quickly than in the past. It expects that will help the company meet its goal of reaching 200 million learners within the next 10 years.</p>
|
||||||
<p>“We’re already seeing tremendous benefits with Kubernetes — improved engineering productivity, faster delivery of applications and a simplified infrastructure. But this is just the beginning. Kubernetes will help transform the way that educational content is delivered online,” says Jackson.</p>
|
<p>"We're already seeing tremendous benefits with Kubernetes — improved engineering productivity, faster delivery of applications and a simplified infrastructure. But this is just the beginning. Kubernetes will help transform the way that educational content is delivered online," says Jackson.</p>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ title: Wikimedia Case Study
|
|||||||
<div class="feature">
|
<div class="feature">
|
||||||
<img src="/images/case_studies/wikimedia.png" alt="Wikimedia">
|
<img src="/images/case_studies/wikimedia.png" alt="Wikimedia">
|
||||||
<p class="quote">
|
<p class="quote">
|
||||||
“Wikimedia Tool Labs is vital for making sure wikis all around the world work as well as they possibly can. Because it’s grown organically for almost 10 years, it has become an extremely challenging environment and difficult to maintain. It’s like a big ball of mud — you really can’t see through it. With Kubernetes, we’re simplifying the environment and making it easier for developers to build the tools that make wikis run better.”
|
"Wikimedia Tool Labs is vital for making sure wikis all around the world work as well as they possibly can. Because it's grown organically for almost 10 years, it has become an extremely challenging environment and difficult to maintain. It's like a big ball of mud — you really can't see through it. With Kubernetes, we're simplifying the environment and making it easier for developers to build the tools that make wikis run better."
|
||||||
</p>
|
</p>
|
||||||
<p class="attrib">— Yuvi Panda, operations engineer at Wikimedia Foundation and Wikimedia Tool Labs</p>
|
<p class="attrib">— Yuvi Panda, operations engineer at Wikimedia Foundation and Wikimedia Tool Labs</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,13 +67,13 @@ title: Wikimedia Case Study
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>Using Kubernetes to provide tools for maintaining wikis</h4>
|
<h4>Using Kubernetes to provide tools for maintaining wikis</h4>
|
||||||
<p>
|
<p>
|
||||||
Wikimedia Tool Labs is run by a staff of four-and-a-half paid employees and two volunteers. The infrastructure didn't make it easy or intuitive for developers to build bots and other tools to make wikis work more easily. Yuvi says, “It’s incredibly chaotic. We have lots of Perl and Bash duct tape on top of it. Everything is super fragile.”
|
Wikimedia Tool Labs is run by a staff of four-and-a-half paid employees and two volunteers. The infrastructure didn't make it easy or intuitive for developers to build bots and other tools to make wikis work more easily. Yuvi says, "It's incredibly chaotic. We have lots of Perl and Bash duct tape on top of it. Everything is super fragile."
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
To solve the problem, Wikimedia Tool Labs migrated parts of its infrastructure to Kubernetes, in preparation for eventually moving its entire system. Yuvi said Kubernetes greatly simplifies maintenance. The goal is to allow developers creating bots and other tools to use whatever development methods they want, but make it easier for the Wikimedia Tool Labs to maintain the required infrastructure for hosting and sharing them.
|
To solve the problem, Wikimedia Tool Labs migrated parts of its infrastructure to Kubernetes, in preparation for eventually moving its entire system. Yuvi said Kubernetes greatly simplifies maintenance. The goal is to allow developers creating bots and other tools to use whatever development methods they want, but make it easier for the Wikimedia Tool Labs to maintain the required infrastructure for hosting and sharing them.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
“With Kubernetes, I’ve been able to remove a lot of our custom-made code, which makes everything easier to maintain. Our users’ code also runs in a more stable way than previously,” says Yuvi.
|
"With Kubernetes, I've been able to remove a lot of our custom-made code, which makes everything easier to maintain. Our users' code also runs in a more stable way than previously," says Yuvi.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@@ -84,13 +84,13 @@ title: Wikimedia Case Study
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>Simplifying infrastructure and keeping wikis running better</h4>
|
<h4>Simplifying infrastructure and keeping wikis running better</h4>
|
||||||
<p>
|
<p>
|
||||||
Wikimedia Tool Labs has seen great success with the initial Kubernetes deployment. Old code is being simplified and eliminated, contributing developers don’t have to change the way they write their tools and bots, and those tools and bots run in a more stable fashion than they have in the past. The paid staff and volunteers are able to better keep up with fixing issues.
|
Wikimedia Tool Labs has seen great success with the initial Kubernetes deployment. Old code is being simplified and eliminated, contributing developers don't have to change the way they write their tools and bots, and those tools and bots run in a more stable fashion than they have in the past. The paid staff and volunteers are able to better keep up with fixing issues.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
In the future, with a more complete migration to Kubernetes, Wikimedia Tool Labs expects to make it even easier to host and maintain the bots and tools that help run wikis across the world. The tool labs already host approximately 1,300 tools and bots from 800 volunteers, with many more being submitted every day. Twenty percent of the tool labs’ web tools that account for more than 60 percent of web traffic now run on Kubernetes. The tool labs has a 25-node cluster that keeps up with each new Kubernetes release. Many existing web tools are migrating to Kubernetes.
|
In the future, with a more complete migration to Kubernetes, Wikimedia Tool Labs expects to make it even easier to host and maintain the bots and tools that help run wikis across the world. The tool labs already host approximately 1,300 tools and bots from 800 volunteers, with many more being submitted every day. Twenty percent of the tool labs' web tools that account for more than 60 percent of web traffic now run on Kubernetes. The tool labs has a 25-node cluster that keeps up with each new Kubernetes release. Many existing web tools are migrating to Kubernetes.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
“Our goal is to make sure that people all over the world can share knowledge as easily as possible. Kubernetes helps with that, by making it easier for wikis everywhere to have the tools they need to thrive,” says Yuvi.
|
"Our goal is to make sure that people all over the world can share knowledge as easily as possible. Kubernetes helps with that, by making it easier for wikis everywhere to have the tools they need to thrive," says Yuvi.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@ title: Community
|
|||||||
<h3>SIGs</h3>
|
<h3>SIGs</h3>
|
||||||
<p>Have a special interest in how Kubernetes works with another technology? See our ever growing
|
<p>Have a special interest in how Kubernetes works with another technology? See our ever growing
|
||||||
<a href="https://github.com/kubernetes/kubernetes/wiki/Special-Interest-Groups-(SIGs)">lists of SIGs</a>,
|
<a href="https://github.com/kubernetes/kubernetes/wiki/Special-Interest-Groups-(SIGs)">lists of SIGs</a>,
|
||||||
from AWS and Openstack to Big Data and Scalability, there’s a place for you to contribute and instructions
|
from AWS and Openstack to Big Data and Scalability, there's a place for you to contribute and instructions
|
||||||
for forming a new SIG if your special interest isn’t covered (yet).</p>
|
for forming a new SIG if your special interest isn't covered (yet).</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h3>Events</h3>
|
<h3>Events</h3>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ following diagram:
|
|||||||
In a typical Kubernetes cluster, the API served on port 443. A TLS connection is
|
In a typical Kubernetes cluster, the API served on port 443. A TLS connection is
|
||||||
established. The API server presents a certificate. This certificate is
|
established. The API server presents a certificate. This certificate is
|
||||||
often self-signed, so `$USER/.kube/config` on the user's machine typically
|
often self-signed, so `$USER/.kube/config` on the user's machine typically
|
||||||
contains the root certficate for the API server's certificate, which when specified
|
contains the root certificate for the API server's certificate, which when specified
|
||||||
is used in place of the system default root certificates. This certificate is typically
|
is used in place of the system default root certificates. This certificate is typically
|
||||||
automatically written into your `$USER/.kube/config` when you create a cluster yourself
|
automatically written into your `$USER/.kube/config` when you create a cluster yourself
|
||||||
using `kube-up.sh`. If the cluster has multiple users, then the creator needs to share
|
using `kube-up.sh`. If the cluster has multiple users, then the creator needs to share
|
||||||
@@ -86,7 +86,7 @@ For version 1.2, clusters created by `kube-up.sh` are configured so that no auth
|
|||||||
required for any request.
|
required for any request.
|
||||||
|
|
||||||
As of version 1.3, clusters created by `kube-up.sh` are configured so that the ABAC authorization
|
As of version 1.3, clusters created by `kube-up.sh` are configured so that the ABAC authorization
|
||||||
modules is enabled. However, its input file is initially set to allow all users to do all
|
modules are enabled. However, its input file is initially set to allow all users to do all
|
||||||
operations. The cluster administrator needs to edit that file, or configure a different authorizer
|
operations. The cluster administrator needs to edit that file, or configure a different authorizer
|
||||||
to restrict what users can do.
|
to restrict what users can do.
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Add-ons in each section are sorted alphabetically - the ordering does not imply
|
|||||||
|
|
||||||
* [Calico](http://docs.projectcalico.org/v2.0/getting-started/kubernetes/installation/hosted/) is a secure L3 networking and network policy provider.
|
* [Calico](http://docs.projectcalico.org/v2.0/getting-started/kubernetes/installation/hosted/) is a secure L3 networking and network policy provider.
|
||||||
* [Canal](https://github.com/tigera/canal/tree/master/k8s-install/kubeadm) unites Flannel and Calico, providing networking and network policy.
|
* [Canal](https://github.com/tigera/canal/tree/master/k8s-install/kubeadm) unites Flannel and Calico, providing networking and network policy.
|
||||||
* [Flannel](https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml) is a overlay network provider that can be used with Kubernetes.
|
* [Flannel](https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml) is an overlay network provider that can be used with Kubernetes.
|
||||||
* [Romana](http://romana.io) is a Layer 3 networking solution for pod networks that also supports the [NetworkPolicy API](/docs/user-guide/networkpolicies/). Kubeadm add-on installation details available [here](https://github.com/romana/romana/tree/master/containerize).
|
* [Romana](http://romana.io) is a Layer 3 networking solution for pod networks that also supports the [NetworkPolicy API](/docs/user-guide/networkpolicies/). Kubeadm add-on installation details available [here](https://github.com/romana/romana/tree/master/containerize).
|
||||||
* [Weave Net](https://www.weave.works/docs/net/latest/kube-addon/) provides networking and network policy, will carry on working on both sides of a network partition, and does not require an external database.
|
* [Weave Net](https://www.weave.works/docs/net/latest/kube-addon/) provides networking and network policy, will carry on working on both sides of a network partition, and does not require an external database.
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ For additional HTTP configuration, refer to the [kubeconfig](/docs/user-guide/ku
|
|||||||
|
|
||||||
When faced with an admission decision, the API Server POSTs a JSON serialized api.imagepolicy.v1alpha1.ImageReview object describing the action. This object contains fields describing the containers being admitted, as well as any pod annotations that match `*.image-policy.k8s.io/*`.
|
When faced with an admission decision, the API Server POSTs a JSON serialized api.imagepolicy.v1alpha1.ImageReview object describing the action. This object contains fields describing the containers being admitted, as well as any pod annotations that match `*.image-policy.k8s.io/*`.
|
||||||
|
|
||||||
Note that webhook API objects are subject to the same versioning compatibility rules as other Kubernetes API objects. Implementers should be aware of looser compatibility promises for alpha objects and check the “apiVersion” field of the request to ensure correct deserialization. Additionally, the API Server must enable the imagepolicy.k8s.io/v1alpha1 API extensions group (`--runtime-config=imagepolicy.k8s.io/v1alpha1=true`).
|
Note that webhook API objects are subject to the same versioning compatibility rules as other Kubernetes API objects. Implementers should be aware of looser compatibility promises for alpha objects and check the "apiVersion" field of the request to ensure correct deserialization. Additionally, the API Server must enable the imagepolicy.k8s.io/v1alpha1 API extensions group (`--runtime-config=imagepolicy.k8s.io/v1alpha1=true`).
|
||||||
|
|
||||||
An example request body:
|
An example request body:
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ An example request body:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The remote service is expected to fill the ImageReviewStatus field of the request and respond to either allow or disallow access. The response body’s “spec” field is ignored and may be omitted. A permissive response would return:
|
The remote service is expected to fill the ImageReviewStatus field of the request and respond to either allow or disallow access. The response body's "spec" field is ignored and may be omitted. A permissive response would return:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ Specifying the default profile to apply to containers when none is provided:
|
|||||||
- **key**: `apparmor.security.beta.kubernetes.io/defaultProfileName`
|
- **key**: `apparmor.security.beta.kubernetes.io/defaultProfileName`
|
||||||
- **value**: a profile reference, described above
|
- **value**: a profile reference, described above
|
||||||
|
|
||||||
Specifying the list of profiles Pod containers are allowed to specify:
|
Specifying the list of profiles Pod containers is allowed to specify:
|
||||||
|
|
||||||
- **key**: `apparmor.security.beta.kubernetes.io/allowedProfileNames`
|
- **key**: `apparmor.security.beta.kubernetes.io/allowedProfileNames`
|
||||||
- **value**: a comma-separated list of profile references (described above)
|
- **value**: a comma-separated list of profile references (described above)
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ The script will generate three files: `ca.crt`, `server.crt`, and `server.key`.
|
|||||||
Finally, add the following parameters into API server start parameters:
|
Finally, add the following parameters into API server start parameters:
|
||||||
|
|
||||||
- `--client-ca-file=/srv/kubernetes/ca.crt`
|
- `--client-ca-file=/srv/kubernetes/ca.crt`
|
||||||
- `--tls-cert-file=/srv/kubernetes/server.cert`
|
- `--tls-cert-file=/srv/kubernetes/server.crt`
|
||||||
- `--tls-private-key-file=/srv/kubernetes/server.key`
|
- `--tls-private-key-file=/srv/kubernetes/server.key`
|
||||||
|
|
||||||
#### easyrsa
|
#### easyrsa
|
||||||
@@ -468,7 +468,7 @@ Finally, add the following parameters into API server start parameters:
|
|||||||
1. Fill in and add the following parameters into the API server start parameters:
|
1. Fill in and add the following parameters into the API server start parameters:
|
||||||
|
|
||||||
--client-ca-file=/yourdirectory/ca.crt
|
--client-ca-file=/yourdirectory/ca.crt
|
||||||
--tls-cert-file=/yourdirectory/server.cert
|
--tls-cert-file=/yourdirectory/server.crt
|
||||||
--tls-private-key-file=/yourdirectory/server.key
|
--tls-private-key-file=/yourdirectory/server.key
|
||||||
|
|
||||||
#### openssl
|
#### openssl
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ roleRef:
|
|||||||
|
|
||||||
Finally a `ClusterRoleBinding` may be used to grant permissions in all
|
Finally a `ClusterRoleBinding` may be used to grant permissions in all
|
||||||
namespaces. The following `ClusterRoleBinding` allows any user in the group
|
namespaces. The following `ClusterRoleBinding` allows any user in the group
|
||||||
"manager" to read secrets in any namepsace.
|
"manager" to read secrets in any namespace.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# This cluster role binding allows anyone in the "manager" group to read secrets in any namespace.
|
# This cluster role binding allows anyone in the "manager" group to read secrets in any namespace.
|
||||||
|
|||||||
@@ -61,12 +61,12 @@ selects a node for them to run on.
|
|||||||
|
|
||||||
### addons
|
### addons
|
||||||
|
|
||||||
Addons are pods and services that implement cluster features. They don't run on
|
Addons are pods and services that implement cluster features. The pods may be managed
|
||||||
the master VM, but currently the default setup scripts that make the API calls
|
by Deployments, ReplicationContollers, etc. Namespaced addon objects are created in
|
||||||
to create these pods and services does run on the master VM. See:
|
the "kube-system" namespace.
|
||||||
[kube-master-addons](http://releases.k8s.io/HEAD/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh)
|
|
||||||
|
|
||||||
Addon objects are created in the "kube-system" namespace.
|
Addon manager takes the responsibility for creating and maintaining addon resources.
|
||||||
|
See [here](http://releases.k8s.io/HEAD/cluster/addons) for more details.
|
||||||
|
|
||||||
#### DNS
|
#### DNS
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ an extended period of time (10min but it may change in the future).
|
|||||||
Cluster autoscaler is configured per instance group (GCE) or node pool (GKE).
|
Cluster autoscaler is configured per instance group (GCE) or node pool (GKE).
|
||||||
|
|
||||||
If you are using GCE then you can either enable it while creating a cluster with kube-up.sh script.
|
If you are using GCE then you can either enable it while creating a cluster with kube-up.sh script.
|
||||||
To configure cluser autoscaler you have to set 3 environment variables:
|
To configure cluster autoscaler you have to set 3 environment variables:
|
||||||
|
|
||||||
* `KUBE_ENABLE_CLUSTER_AUTOSCALER` - it enables cluster autoscaler if set to true.
|
* `KUBE_ENABLE_CLUSTER_AUTOSCALER` - it enables cluster autoscaler if set to true.
|
||||||
* `KUBE_AUTOSCALER_MIN_NODES` - minimum number of nodes in the cluster.
|
* `KUBE_AUTOSCALER_MIN_NODES` - minimum number of nodes in the cluster.
|
||||||
@@ -180,7 +180,7 @@ For the purposes of these flags, _legacy_ APIs are those APIs which have been ex
|
|||||||
|
|
||||||
The objects that are stored to disk for a cluster's internal representation of the Kubernetes resources active in the cluster are written using a particular version of the API.
|
The objects that are stored to disk for a cluster's internal representation of the Kubernetes resources active in the cluster are written using a particular version of the API.
|
||||||
When the supported API changes, these objects may need to be rewritten in the newer API. Failure to do this will eventually result in resources that are no longer decodable or usable
|
When the supported API changes, these objects may need to be rewritten in the newer API. Failure to do this will eventually result in resources that are no longer decodable or usable
|
||||||
by the kubernetes API server.
|
by the Kubernetes API server.
|
||||||
|
|
||||||
`KUBE_API_VERSIONS` environment variable for the `kube-apiserver` binary which controls the API versions that are supported in the cluster. The first version in the list is used as the cluster's storage version. Hence, to set a specific version as the storage version, bring it to the front of list of versions in the value of `KUBE_API_VERSIONS`. You need to restart the `kube-apiserver` binary
|
`KUBE_API_VERSIONS` environment variable for the `kube-apiserver` binary which controls the API versions that are supported in the cluster. The first version in the list is used as the cluster's storage version. Hence, to set a specific version as the storage version, bring it to the front of list of versions in the value of `KUBE_API_VERSIONS`. You need to restart the `kube-apiserver` binary
|
||||||
for changes to this variable to take effect.
|
for changes to this variable to take effect.
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ Mitigations:
|
|||||||
- Mitigates: Apiserver VM shutdown or apiserver crashing
|
- Mitigates: Apiserver VM shutdown or apiserver crashing
|
||||||
- Mitigates: Supporting services VM shutdown or crashes
|
- Mitigates: Supporting services VM shutdown or crashes
|
||||||
|
|
||||||
- Action use IaaS providers reliable storage (e.g GCE PD or AWS EBS volume) for VMs with apiserver+etcd
|
- Action use IaaS providers reliable storage (e.g. GCE PD or AWS EBS volume) for VMs with apiserver+etcd
|
||||||
- Mitigates: Apiserver backing storage lost
|
- Mitigates: Apiserver backing storage lost
|
||||||
|
|
||||||
- Action: Use (experimental) [high-availability](/docs/admin/high-availability) configuration
|
- Action: Use (experimental) [high-availability](/docs/admin/high-availability) configuration
|
||||||
|
|||||||
+14
-15
@@ -7,20 +7,20 @@ title: Daemon Sets
|
|||||||
* TOC
|
* TOC
|
||||||
{:toc}
|
{:toc}
|
||||||
|
|
||||||
## What is a Daemon Set?
|
## What is a DaemonSet?
|
||||||
|
|
||||||
A _Daemon Set_ ensures that all (or some) nodes run a copy of a pod. As nodes are added to the
|
A _DaemonSet_ ensures that all (or some) nodes run a copy of a pod. As nodes are added to the
|
||||||
cluster, pods are added to them. As nodes are removed from the cluster, those pods are garbage
|
cluster, pods are added to them. As nodes are removed from the cluster, those pods are garbage
|
||||||
collected. Deleting a Daemon Set will clean up the pods it created.
|
collected. Deleting a DaemonSet will clean up the pods it created.
|
||||||
|
|
||||||
Some typical uses of a Daemon Set are:
|
Some typical uses of a DaemonSet are:
|
||||||
|
|
||||||
- running a cluster storage daemon, such as `glusterd`, `ceph`, on each node.
|
- running a cluster storage daemon, such as `glusterd`, `ceph`, on each node.
|
||||||
- running a logs collection daemon on every node, such as `fluentd` or `logstash`.
|
- running a logs collection daemon on every node, such as `fluentd` or `logstash`.
|
||||||
- running a node monitoring daemon on every node, such as [Prometheus Node Exporter](
|
- running a node monitoring daemon on every node, such as [Prometheus Node Exporter](
|
||||||
https://github.com/prometheus/node_exporter), `collectd`, New Relic agent, or Ganglia `gmond`.
|
https://github.com/prometheus/node_exporter), `collectd`, New Relic agent, or Ganglia `gmond`.
|
||||||
|
|
||||||
In a simple case, one Daemon Set, covering all nodes, would be used for each type of daemon.
|
In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon.
|
||||||
A more complex setup might use multiple DaemonSets would be used for a single type of daemon,
|
A more complex setup might use multiple DaemonSets would be used for a single type of daemon,
|
||||||
but with different flags and/or different memory and cpu requests for different hardware types.
|
but with different flags and/or different memory and cpu requests for different hardware types.
|
||||||
|
|
||||||
@@ -88,18 +88,17 @@ created by the Daemon controller have the machine already selected (`.spec.nodeN
|
|||||||
when the pod is created, so it is ignored by the scheduler). Therefore:
|
when the pod is created, so it is ignored by the scheduler). Therefore:
|
||||||
|
|
||||||
- the [`unschedulable`](/docs/admin/node/#manual-node-administration) field of a node is not respected
|
- the [`unschedulable`](/docs/admin/node/#manual-node-administration) field of a node is not respected
|
||||||
by the daemon set controller.
|
by the DaemonSet controller.
|
||||||
- daemon set controller can make pods even when the scheduler has not been started, which can help cluster
|
- DaemonSet controller can make pods even when the scheduler has not been started, which can help cluster
|
||||||
bootstrap.
|
bootstrap.
|
||||||
|
|
||||||
## Communicating with DaemonSet Pods
|
## Communicating with DaemonSet Pods
|
||||||
|
|
||||||
Some possible patterns for communicating with pods in a DaemonSet are:
|
Some possible patterns for communicating with pods in a DaemonSet are:
|
||||||
|
|
||||||
- **Push**: Pods in the Daemon Set are configured to send updates to another service, such
|
- **Push**: Pods in the DaemonSet are configured to send updates to another service, such
|
||||||
as a stats database. They do not have clients.
|
as a stats database. They do not have clients.
|
||||||
- **NodeIP and Known Port**: Pods in the Daemon Set use a `hostPort`, so that the pods are reachable
|
- **NodeIP and Known Port**: Pods in the DaemonSet use a `hostPort`, so that the pods are reachable via the node IPs. Clients know the list of nodes ips somehow, and know the port by convention.
|
||||||
via the node IPs. Clients knows the list of nodes ips somehow, and know the port by convention.
|
|
||||||
- **DNS**: Create a [headless service](/docs/user-guide/services/#headless-services) with the same pod selector,
|
- **DNS**: Create a [headless service](/docs/user-guide/services/#headless-services) with the same pod selector,
|
||||||
and then discover DaemonSets using the `endpoints` resource or retrieve multiple A records from
|
and then discover DaemonSets using the `endpoints` resource or retrieve multiple A records from
|
||||||
DNS.
|
DNS.
|
||||||
@@ -126,11 +125,11 @@ You cannot update a DaemonSet.
|
|||||||
|
|
||||||
Support for updating DaemonSets and controlled updating of nodes is planned.
|
Support for updating DaemonSets and controlled updating of nodes is planned.
|
||||||
|
|
||||||
## Alternatives to Daemon Set
|
## Alternatives to DaemonSet
|
||||||
|
|
||||||
### Init Scripts
|
### Init Scripts
|
||||||
|
|
||||||
It is certainly possible to run daemon processes by directly starting them on a node (e.g using
|
It is certainly possible to run daemon processes by directly starting them on a node (e.g. using
|
||||||
`init`, `upstartd`, or `systemd`). This is perfectly fine. However, there are several advantages to
|
`init`, `upstartd`, or `systemd`). This is perfectly fine. However, there are several advantages to
|
||||||
running such processes via a DaemonSet:
|
running such processes via a DaemonSet:
|
||||||
|
|
||||||
@@ -145,9 +144,9 @@ running such processes via a DaemonSet:
|
|||||||
### Bare Pods
|
### Bare Pods
|
||||||
|
|
||||||
It is possible to create pods directly which specify a particular node to run on. However,
|
It is possible to create pods directly which specify a particular node to run on. However,
|
||||||
a Daemon Set replaces pods that are deleted or terminated for any reason, such as in the case of
|
a DaemonSet replaces pods that are deleted or terminated for any reason, such as in the case of
|
||||||
node failure or disruptive node maintenance, such as a kernel upgrade. For this reason, you should
|
node failure or disruptive node maintenance, such as a kernel upgrade. For this reason, you should
|
||||||
use a Daemon Set rather than creating individual pods.
|
use a DaemonSet rather than creating individual pods.
|
||||||
|
|
||||||
### Static Pods
|
### Static Pods
|
||||||
|
|
||||||
@@ -159,7 +158,7 @@ in cluster bootstrapping cases. Also, static pods may be deprecated in the futu
|
|||||||
|
|
||||||
### Replication Controller
|
### Replication Controller
|
||||||
|
|
||||||
Daemon Set are similar to [Replication Controllers](/docs/user-guide/replication-controller) in that
|
DaemonSet are similar to [Replication Controllers](/docs/user-guide/replication-controller) in that
|
||||||
they both create pods, and those pods have processes which are not expected to terminate (e.g. web servers,
|
they both create pods, and those pods have processes which are not expected to terminate (e.g. web servers,
|
||||||
storage servers).
|
storage servers).
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ For example, a pod with ip `1.2.3.4` in the namespace `default` with a DNS name
|
|||||||
Currently when a pod is created, its hostname is the Pod's `metadata.name` value.
|
Currently when a pod is created, its hostname is the Pod's `metadata.name` value.
|
||||||
|
|
||||||
With v1.2, users can specify a Pod annotation, `pod.beta.kubernetes.io/hostname`, to specify what the Pod's hostname should be.
|
With v1.2, users can specify a Pod annotation, `pod.beta.kubernetes.io/hostname`, to specify what the Pod's hostname should be.
|
||||||
The Pod annotation, if specified, takes precendence over the Pod's name, to be the hostname of the pod.
|
The Pod annotation, if specified, takes precedence over the Pod's name, to be the hostname of the pod.
|
||||||
For example, given a Pod with annotation `pod.beta.kubernetes.io/hostname: my-pod-name`, the Pod will have its hostname set to "my-pod-name".
|
For example, given a Pod with annotation `pod.beta.kubernetes.io/hostname: my-pod-name`, the Pod will have its hostname set to "my-pod-name".
|
||||||
|
|
||||||
With v1.3, the PodSpec has a `hostname` field, which can be used to specify the Pod's hostname. This field value takes precedence over the
|
With v1.3, the PodSpec has a `hostname` field, which can be used to specify the Pod's hostname. This field value takes precedence over the
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ federation-apiserver
|
|||||||
--admission-control-config-file string File with admission control configuration.
|
--admission-control-config-file string File with admission control configuration.
|
||||||
--advertise-address ip The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
|
--advertise-address ip The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
|
||||||
--anonymous-auth Enables anonymous requests to the secure port of the API server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (default true)
|
--anonymous-auth Enables anonymous requests to the secure port of the API server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (default true)
|
||||||
--apiserver-count int The number of apiservers running in the cluster. (default 1)
|
--apiserver-count int The number of apiservers running in the cluster. Must be a positive number. (default 1)
|
||||||
--audit-log-maxage int The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.
|
--audit-log-maxage int The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.
|
||||||
--audit-log-maxbackup int The maximum number of old audit log files to retain.
|
--audit-log-maxbackup int The maximum number of old audit log files to retain.
|
||||||
--audit-log-maxsize int The maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.
|
--audit-log-maxsize int The maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ $ KUBE_REGISTRY="gcr.io/myrepository" federation/develop/develop.sh build_image
|
|||||||
$ KUBE_REGISTRY="gcr.io/myrepository" federation/develop/develop.sh push
|
$ KUBE_REGISTRY="gcr.io/myrepository" federation/develop/develop.sh push
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: This is going to overwite the values you might have set for
|
Note: This is going to overwrite the values you might have set for
|
||||||
`apiserverRegistry`, `apiserverVersion`, `controllerManagerRegistry` and
|
`apiserverRegistry`, `apiserverVersion`, `controllerManagerRegistry` and
|
||||||
`controllerManagerVersion` in your `${FEDERATION_OUTPUT_ROOT}/values.yaml`
|
`controllerManagerVersion` in your `${FEDERATION_OUTPUT_ROOT}/values.yaml`
|
||||||
file. Hence, it is not recommend to customize these values in
|
file. Hence, it is not recommend to customize these values in
|
||||||
@@ -218,7 +218,7 @@ Once you've registered your cluster with the federation, you'll need to update K
|
|||||||
|
|
||||||
### Kubernetes 1.5+: Passing federations flag via config map to kube-dns
|
### Kubernetes 1.5+: Passing federations flag via config map to kube-dns
|
||||||
|
|
||||||
For kubernetes clusters of version 1.5+, you can pass the
|
For Kubernetes clusters of version 1.5+, you can pass the
|
||||||
`--federations` flag to kube-dns via the kube-dns config map.
|
`--federations` flag to kube-dns via the kube-dns config map.
|
||||||
The flag uses the following format:
|
The flag uses the following format:
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ $ KUBERNETES_PROVIDER=gce FEDERATION_DNS_PROVIDER=google-clouddns FEDERATION_NAM
|
|||||||
set appropriately if it is missing and `KUBERNETES_PROVIDER` is one of `gce`, `gke` and `aws`.
|
set appropriately if it is missing and `KUBERNETES_PROVIDER` is one of `gce`, `gke` and `aws`.
|
||||||
This is used to resolve DNS requests for federation services. The service
|
This is used to resolve DNS requests for federation services. The service
|
||||||
controller keeps DNS records with the provider updated as services/pods are
|
controller keeps DNS records with the provider updated as services/pods are
|
||||||
updated in underlying kubernetes clusters.
|
updated in underlying Kubernetes clusters.
|
||||||
|
|
||||||
`FEDERATION_NAME` is a name you can choose for your federation. This is the name that will appear in DNS routes.
|
`FEDERATION_NAME` is a name you can choose for your federation. This is the name that will appear in DNS routes.
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ External garbage collection tools are not recommended as these tools can potenti
|
|||||||
|
|
||||||
### Image Collection
|
### Image Collection
|
||||||
|
|
||||||
kubernetes manages lifecycle of all images through imageManager, with the cooperation
|
Kubernetes manages lifecycle of all images through imageManager, with the cooperation
|
||||||
of cadvisor.
|
of cadvisor.
|
||||||
|
|
||||||
The policy for garbage collecting images takes two factors into consideration:
|
The policy for garbage collecting images takes two factors into consideration:
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ If true, reads will be directed to leader etcd replica.
|
|||||||
Setting this value to true is optional: reads will be more reliable but will also be slower.
|
Setting this value to true is optional: reads will be more reliable but will also be slower.
|
||||||
|
|
||||||
Optionally, you can specify a GCE zone where the first master replica is to be created.
|
Optionally, you can specify a GCE zone where the first master replica is to be created.
|
||||||
Set the the following flag:
|
Set the following flag:
|
||||||
|
|
||||||
* `KUBE_GCE_ZONE=zone` - zone where the first master replica will run.
|
* `KUBE_GCE_ZONE=zone` - zone where the first master replica will run.
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -13,7 +13,7 @@ It assumes some familiarity with concepts in the [User Guide](/docs/user-guide/)
|
|||||||
|
|
||||||
## Planning a cluster
|
## Planning a cluster
|
||||||
|
|
||||||
There are many different examples of how to setup a kubernetes cluster. Many of them are listed in this
|
There are many different examples of how to setup a Kubernetes cluster. Many of them are listed in this
|
||||||
[matrix](/docs/getting-started-guides/). We call each of the combinations in this matrix a *distro*.
|
[matrix](/docs/getting-started-guides/). We call each of the combinations in this matrix a *distro*.
|
||||||
|
|
||||||
Before choosing a particular guide, here are some things to consider:
|
Before choosing a particular guide, here are some things to consider:
|
||||||
@@ -25,12 +25,12 @@ Before choosing a particular guide, here are some things to consider:
|
|||||||
- Will your cluster be on-premises, or in the cloud (IaaS)? Kubernetes does not directly support hybrid clusters. We
|
- Will your cluster be on-premises, or in the cloud (IaaS)? Kubernetes does not directly support hybrid clusters. We
|
||||||
recommend setting up multiple clusters rather than spanning distant locations.
|
recommend setting up multiple clusters rather than spanning distant locations.
|
||||||
- Will you be running Kubernetes on "bare metal" or virtual machines? Kubernetes supports both, via different distros.
|
- Will you be running Kubernetes on "bare metal" or virtual machines? Kubernetes supports both, via different distros.
|
||||||
- Do you just want to run a cluster, or do you expect to do active development of kubernetes project code? If the
|
- Do you just want to run a cluster, or do you expect to do active development of Kubernetes project code? If the
|
||||||
latter, it is better to pick a distro actively used by other developers. Some distros only use binary releases, but
|
latter, it is better to pick a distro actively used by other developers. Some distros only use binary releases, but
|
||||||
offer is a greater variety of choices.
|
offer is a greater variety of choices.
|
||||||
- Not all distros are maintained as actively. Prefer ones which are listed as tested on a more recent version of
|
- Not all distros are maintained as actively. Prefer ones which are listed as tested on a more recent version of
|
||||||
Kubernetes.
|
Kubernetes.
|
||||||
- If you are configuring kubernetes on-premises, you will need to consider what [networking
|
- If you are configuring Kubernetes on-premises, you will need to consider what [networking
|
||||||
model](/docs/admin/networking) fits best.
|
model](/docs/admin/networking) fits best.
|
||||||
- If you are designing for very high-availability, you may want [clusters in multiple zones](/docs/admin/multi-cluster).
|
- If you are designing for very high-availability, you may want [clusters in multiple zones](/docs/admin/multi-cluster).
|
||||||
- You may want to familiarize yourself with the various
|
- You may want to familiarize yourself with the various
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ kube-apiserver
|
|||||||
--advertise-address ip The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
|
--advertise-address ip The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
|
||||||
--allow-privileged If true, allow privileged containers.
|
--allow-privileged If true, allow privileged containers.
|
||||||
--anonymous-auth Enables anonymous requests to the secure port of the API server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (default true)
|
--anonymous-auth Enables anonymous requests to the secure port of the API server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (default true)
|
||||||
--apiserver-count int The number of apiservers running in the cluster. (default 1)
|
--apiserver-count int The number of apiservers running in the cluster. Must be a positive number. (default 1)
|
||||||
--audit-log-maxage int The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.
|
--audit-log-maxage int The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.
|
||||||
--audit-log-maxbackup int The maximum number of old audit log files to retain.
|
--audit-log-maxbackup int The maximum number of old audit log files to retain.
|
||||||
--audit-log-maxsize int The maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.
|
--audit-log-maxsize int The maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ StreamingProxyRedirects=true|false (ALPHA - default=false)
|
|||||||
--google-json-key string The Google Cloud Platform Service Account JSON Key to use for authentication.
|
--google-json-key string The Google Cloud Platform Service Account JSON Key to use for authentication.
|
||||||
--horizontal-pod-autoscaler-sync-period duration The period for syncing the number of pods in horizontal pod autoscaler. (default 30s)
|
--horizontal-pod-autoscaler-sync-period duration The period for syncing the number of pods in horizontal pod autoscaler. (default 30s)
|
||||||
--insecure-experimental-approve-all-kubelet-csrs-for-group string The group for which the controller-manager will auto approve all CSRs for kubelet client certificates.
|
--insecure-experimental-approve-all-kubelet-csrs-for-group string The group for which the controller-manager will auto approve all CSRs for kubelet client certificates.
|
||||||
--kube-api-burst int32 Burst to use while talking with kubernetes apiserver (default 30)
|
--kube-api-burst int32 Burst to use while talking with Kubernetes apiserver (default 30)
|
||||||
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
||||||
--kube-api-qps float32 QPS to use while talking with kubernetes apiserver (default 20)
|
--kube-api-qps float32 QPS to use while talking with Kubernetes apiserver (default 20)
|
||||||
--kubeconfig string Path to kubeconfig file with authorization and master location information.
|
--kubeconfig string Path to kubeconfig file with authorization and master location information.
|
||||||
--large-cluster-size-threshold int32 Number of nodes from which NodeController treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller. (default 50)
|
--large-cluster-size-threshold int32 Number of nodes from which NodeController treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller. (default 50)
|
||||||
--leader-elect Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability. (default true)
|
--leader-elect Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability. (default true)
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ StreamingProxyRedirects=true|false (ALPHA - default=false)
|
|||||||
--iptables-masquerade-bit int32 If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31]. (default 14)
|
--iptables-masquerade-bit int32 If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31]. (default 14)
|
||||||
--iptables-min-sync-period duration The minimum interval of how often the iptables rules can be refreshed as endpoints and services change (e.g. '5s', '1m', '2h22m').
|
--iptables-min-sync-period duration The minimum interval of how often the iptables rules can be refreshed as endpoints and services change (e.g. '5s', '1m', '2h22m').
|
||||||
--iptables-sync-period duration The maximum interval of how often iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0. (default 30s)
|
--iptables-sync-period duration The maximum interval of how often iptables rules are refreshed (e.g. '5s', '1m', '2h22m'). Must be greater than 0. (default 30s)
|
||||||
--kube-api-burst int32 Burst to use while talking with kubernetes apiserver (default 10)
|
--kube-api-burst int32 Burst to use while talking with Kubernetes apiserver (default 10)
|
||||||
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
||||||
--kube-api-qps float32 QPS to use while talking with kubernetes apiserver (default 5)
|
--kube-api-qps float32 QPS to use while talking with Kubernetes apiserver (default 5)
|
||||||
--kubeconfig string Path to kubeconfig file with authorization information (the master location is set by the master flag).
|
--kubeconfig string Path to kubeconfig file with authorization information (the master location is set by the master flag).
|
||||||
--masquerade-all If using the pure iptables proxy, SNAT everything
|
--masquerade-all If using the pure iptables proxy, SNAT everything
|
||||||
--master string The address of the Kubernetes API server (overrides any value in kubeconfig)
|
--master string The address of the Kubernetes API server (overrides any value in kubeconfig)
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ ExperimentalHostUserNamespaceDefaulting=true|false (ALPHA - default=false)
|
|||||||
StreamingProxyRedirects=true|false (ALPHA - default=false)
|
StreamingProxyRedirects=true|false (ALPHA - default=false)
|
||||||
--google-json-key string The Google Cloud Platform Service Account JSON Key to use for authentication.
|
--google-json-key string The Google Cloud Platform Service Account JSON Key to use for authentication.
|
||||||
--hard-pod-affinity-symmetric-weight int RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. --hard-pod-affinity-symmetric-weight represents the weight of implicit PreferredDuringScheduling affinity rule. (default 1)
|
--hard-pod-affinity-symmetric-weight int RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding to every RequiredDuringScheduling affinity rule. --hard-pod-affinity-symmetric-weight represents the weight of implicit PreferredDuringScheduling affinity rule. (default 1)
|
||||||
--kube-api-burst int32 Burst to use while talking with kubernetes apiserver (default 100)
|
--kube-api-burst int32 Burst to use while talking with Kubernetes apiserver (default 100)
|
||||||
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
||||||
--kube-api-qps float32 QPS to use while talking with kubernetes apiserver (default 50)
|
--kube-api-qps float32 QPS to use while talking with Kubernetes apiserver (default 50)
|
||||||
--kubeconfig string Path to kubeconfig file with authorization and master location information.
|
--kubeconfig string Path to kubeconfig file with authorization and master location information.
|
||||||
--leader-elect Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability. (default true)
|
--leader-elect Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability. (default true)
|
||||||
--leader-elect-lease-duration duration The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled. (default 15s)
|
--leader-elect-lease-duration duration The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled. (default 15s)
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ Once the cluster is up, you can grab the admin credentials from the master node
|
|||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
There are some environment variables that modify the way that `kubeadm` works. Most users will have no need to set these.
|
There are some environment variables that modify the way that `kubeadm` works. Most users will have no need to set these.
|
||||||
These enviroment variables are a short-term solution, eventually they will be integrated in the kubeadm configuration file.
|
These environment variables are a short-term solution, eventually they will be integrated in the kubeadm configuration file.
|
||||||
|
|
||||||
| Variable | Default | Description |
|
| Variable | Default | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ title: TLS bootstrapping
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This document describes how to set up TLS client certificate boostrapping for kubelets.
|
This document describes how to set up TLS client certificate bootstrapping for kubelets.
|
||||||
Kubernetes 1.4 introduces an experimental API for requesting certificates from a cluster-level
|
Kubernetes 1.4 introduces an experimental API for requesting certificates from a cluster-level
|
||||||
Certificate Authority (CA). The first supported use of this API is the provisioning of TLS client
|
Certificate Authority (CA). The first supported use of this API is the provisioning of TLS client
|
||||||
certificates for kubelets. The proposal can be found [here](https://github.com/kubernetes/kubernetes/pull/20439)
|
certificates for kubelets. The proposal can be found [here](https://github.com/kubernetes/kubernetes/pull/20439)
|
||||||
@@ -17,7 +17,7 @@ and progress on the feature is being tracked as [feature #43](https://github.com
|
|||||||
|
|
||||||
## apiserver configuration
|
## apiserver configuration
|
||||||
|
|
||||||
You must provide a token file which specifies at least one "bootstrap token" assigned to a kubelet boostrap-specific group.
|
You must provide a token file which specifies at least one "bootstrap token" assigned to a kubelet bootstrap-specific group.
|
||||||
This group will later be used in the controller-manager configuration to scope approvals in the default approval
|
This group will later be used in the controller-manager configuration to scope approvals in the default approval
|
||||||
controller. As this feature matures, you should ensure tokens are bound to an RBAC policy which limits requests
|
controller. As this feature matures, you should ensure tokens are bound to an RBAC policy which limits requests
|
||||||
using the bootstrap token to only be able to make requests related to certificate provisioning. When RBAC policy
|
using the bootstrap token to only be able to make requests related to certificate provisioning. When RBAC policy
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ kubelet
|
|||||||
--experimental-allowed-unsafe-sysctls stringSlice Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk.
|
--experimental-allowed-unsafe-sysctls stringSlice Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk.
|
||||||
--experimental-bootstrap-kubeconfig string <Warning: Experimental feature> Path to a kubeconfig file that will be used to get client certificate for kubelet. If the file specified by --kubeconfig does not exist, the bootstrap kubeconfig is used to request a client certificate from the API server. On success, a kubeconfig file referencing the generated key and obtained certificate is written to the path specified by --kubeconfig. The certificate and key file will be stored in the directory pointed by --cert-dir.
|
--experimental-bootstrap-kubeconfig string <Warning: Experimental feature> Path to a kubeconfig file that will be used to get client certificate for kubelet. If the file specified by --kubeconfig does not exist, the bootstrap kubeconfig is used to request a client certificate from the API server. On success, a kubeconfig file referencing the generated key and obtained certificate is written to the path specified by --kubeconfig. The certificate and key file will be stored in the directory pointed by --cert-dir.
|
||||||
--experimental-cgroups-per-qos Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.
|
--experimental-cgroups-per-qos Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.
|
||||||
--experimental-check-node-capabilities-before-mount [Experimental] if set true, the kubelet will check the underlying node for required componenets (binaries, etc.) before performing the mount
|
--experimental-check-node-capabilities-before-mount [Experimental] if set true, the kubelet will check the underlying node for required components (binaries, etc.) before performing the mount
|
||||||
--experimental-cri [Experimental] Enable the Container Runtime Interface (CRI) integration. If --container-runtime is set to "remote", Kubelet will communicate with the runtime/image CRI server listening on the endpoint specified by --remote-runtime-endpoint/--remote-image-endpoint. If --container-runtime is set to "docker", Kubelet will launch a in-process CRI server on behalf of docker, and communicate over a default endpoint.
|
--experimental-cri [Experimental] Enable the Container Runtime Interface (CRI) integration. If --container-runtime is set to "remote", Kubelet will communicate with the runtime/image CRI server listening on the endpoint specified by --remote-runtime-endpoint/--remote-image-endpoint. If --container-runtime is set to "docker", Kubelet will launch a in-process CRI server on behalf of docker, and communicate over a default endpoint.
|
||||||
--experimental-fail-swap-on Makes the Kubelet fail to start if swap is enabled on the node. This is a temporary opton to maintain legacy behavior, failing due to swap enabled will happen by default in v1.6.
|
--experimental-fail-swap-on Makes the Kubelet fail to start if swap is enabled on the node. This is a temporary option to maintain legacy behavior, failing due to swap enabled will happen by default in v1.6.
|
||||||
--experimental-kernel-memcg-notification If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.
|
--experimental-kernel-memcg-notification If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.
|
||||||
--experimental-mounter-path string [Experimental] Path of mounter binary. Leave empty to use the default mount.
|
--experimental-mounter-path string [Experimental] Path of mounter binary. Leave empty to use the default mount.
|
||||||
--experimental-nvidia-gpus int32 Number of NVIDIA GPU devices on this node. Only 0 (default) and 1 are currently supported.
|
--experimental-nvidia-gpus int32 Number of NVIDIA GPU devices on this node. Only 0 (default) and 1 are currently supported.
|
||||||
@@ -107,9 +107,9 @@ StreamingProxyRedirects=true|false (ALPHA - default=false)
|
|||||||
--image-service-endpoint string [Experimental] The unix socket endpoint of remote image service. If not specified, it will be the same with container-runtime-endpoint by default. The endpoint is used only when CRI integration is enabled (--experimental-cri)
|
--image-service-endpoint string [Experimental] The unix socket endpoint of remote image service. If not specified, it will be the same with container-runtime-endpoint by default. The endpoint is used only when CRI integration is enabled (--experimental-cri)
|
||||||
--iptables-drop-bit int32 The bit of the fwmark space to mark packets for dropping. Must be within the range [0, 31]. (default 15)
|
--iptables-drop-bit int32 The bit of the fwmark space to mark packets for dropping. Must be within the range [0, 31]. (default 15)
|
||||||
--iptables-masquerade-bit int32 The bit of the fwmark space to mark packets for SNAT. Must be within the range [0, 31]. Please match this parameter with corresponding parameter in kube-proxy. (default 14)
|
--iptables-masquerade-bit int32 The bit of the fwmark space to mark packets for SNAT. Must be within the range [0, 31]. Please match this parameter with corresponding parameter in kube-proxy. (default 14)
|
||||||
--kube-api-burst int32 Burst to use while talking with kubernetes apiserver (default 10)
|
--kube-api-burst int32 Burst to use while talking with Kubernetes apiserver (default 10)
|
||||||
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
--kube-api-content-type string Content type of requests sent to apiserver. (default "application/vnd.kubernetes.protobuf")
|
||||||
--kube-api-qps int32 QPS to use while talking with kubernetes apiserver (default 5)
|
--kube-api-qps int32 QPS to use while talking with Kubernetes apiserver (default 5)
|
||||||
--kube-reserved mapStringString A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. [default=none]
|
--kube-reserved mapStringString A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. [default=none]
|
||||||
--kubeconfig string Path to a kubeconfig file, specifying how to connect to the API server. --api-servers will be used for the location unless --require-kubeconfig is set. (default "/var/lib/kubelet/kubeconfig")
|
--kubeconfig string Path to a kubeconfig file, specifying how to connect to the API server. --api-servers will be used for the location unless --require-kubeconfig is set. (default "/var/lib/kubelet/kubeconfig")
|
||||||
--kubelet-cgroups string Optional absolute name of cgroups to create and run the Kubelet in.
|
--kubelet-cgroups string Optional absolute name of cgroups to create and run the Kubelet in.
|
||||||
@@ -118,7 +118,7 @@ StreamingProxyRedirects=true|false (ALPHA - default=false)
|
|||||||
--make-iptables-util-chains If true, kubelet will ensure iptables utility rules are present on host. (default true)
|
--make-iptables-util-chains If true, kubelet will ensure iptables utility rules are present on host. (default true)
|
||||||
--manifest-url string URL for accessing the container manifest
|
--manifest-url string URL for accessing the container manifest
|
||||||
--manifest-url-header string HTTP header to use when accessing the manifest URL, with the key separated from the value with a ':', as in 'key:value'
|
--manifest-url-header string HTTP header to use when accessing the manifest URL, with the key separated from the value with a ':', as in 'key:value'
|
||||||
--master-service-namespace string The namespace from which the kubernetes master services should be injected into pods (default "default")
|
--master-service-namespace string The namespace from which the Kubernetes master services should be injected into pods (default "default")
|
||||||
--max-open-files int Number of files that can be opened by Kubelet process. [default=1000000] (default 1000000)
|
--max-open-files int Number of files that can be opened by Kubelet process. [default=1000000] (default 1000000)
|
||||||
--max-pods int32 Number of Pods that can run on this Kubelet. (default 110)
|
--max-pods int32 Number of Pods that can run on this Kubelet. (default 110)
|
||||||
--minimum-image-ttl-duration duration Minimum age for an unused image before it is garbage collected. Examples: '300ms', '10s' or '2h45m'. Default: '2m' (default 2m0s)
|
--minimum-image-ttl-duration duration Minimum age for an unused image before it is garbage collected. Examples: '300ms', '10s' or '2h45m'. Default: '2m' (default 2m0s)
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ Note that this pod specifies explicit resource *limits* and *requests* so it did
|
|||||||
default values.
|
default values.
|
||||||
|
|
||||||
Note: The *limits* for CPU resource are enforced in the default Kubernetes setup on the physical node
|
Note: The *limits* for CPU resource are enforced in the default Kubernetes setup on the physical node
|
||||||
that runs the container unless the administrator deploys the kubelet with the folllowing flag:
|
that runs the container unless the administrator deploys the kubelet with the following flag:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubelet --help
|
$ kubelet --help
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ You may want to set up multiple Kubernetes clusters, both to
|
|||||||
have clusters in different regions to be nearer to your users, and to tolerate failures and/or invasive maintenance.
|
have clusters in different regions to be nearer to your users, and to tolerate failures and/or invasive maintenance.
|
||||||
This document describes some of the issues to consider when making a decision about doing so.
|
This document describes some of the issues to consider when making a decision about doing so.
|
||||||
|
|
||||||
If you decide to have multiple clusters, kubernetes provides a way to [federate them](/docs/admin/federation/)
|
If you decide to have multiple clusters, Kubernetes provides a way to [federate them](/docs/admin/federation/)
|
||||||
|
|
||||||
## Scope of a single cluster
|
## Scope of a single cluster
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ Second, decide how many clusters should be able to be unavailable at the same ti
|
|||||||
the number that can be unavailable `U`. If you are not sure, then 1 is a fine choice.
|
the number that can be unavailable `U`. If you are not sure, then 1 is a fine choice.
|
||||||
|
|
||||||
If it is allowable for load-balancing to direct traffic to any region in the event of a cluster failure, then
|
If it is allowable for load-balancing to direct traffic to any region in the event of a cluster failure, then
|
||||||
you need at least the larger of `R` or `U + 1` clusters. If it is not (e.g you want to ensure low latency for all
|
you need at least the larger of `R` or `U + 1` clusters. If it is not (e.g. you want to ensure low latency for all
|
||||||
users in the event of a cluster failure), then you need to have `R * (U + 1)` clusters
|
users in the event of a cluster failure), then you need to have `R * (U + 1)` clusters
|
||||||
(`U + 1` in each of `R` regions). In any case, try to put each cluster in a different zone.
|
(`U + 1` in each of `R` regions). In any case, try to put each cluster in a different zone.
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ Let's create some content.
|
|||||||
$ kubectl run snowflake --image=kubernetes/serve_hostname --replicas=2
|
$ kubectl run snowflake --image=kubernetes/serve_hostname --replicas=2
|
||||||
```
|
```
|
||||||
We have just created a deployment whose replica size is 2 that is running the pod called snowflake with a basic container that just serves the hostname.
|
We have just created a deployment whose replica size is 2 that is running the pod called snowflake with a basic container that just serves the hostname.
|
||||||
Note that `kubectl run` creates deployments only on kubernetes cluster >= v1.2. If you are running older versions, it creates replication controllers instead.
|
Note that `kubectl run` creates deployments only on Kubernetes cluster >= v1.2. If you are running older versions, it creates replication controllers instead.
|
||||||
If you want to obtain the old behavior, use `--generator=run/v1` to create replication controllers. See [`kubectl run`](/docs/user-guide/kubectl/kubectl_run/) for more details.
|
If you want to obtain the old behavior, use `--generator=run/v1` to create replication controllers. See [`kubectl run`](/docs/user-guide/kubectl/kubectl_run/) for more details.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ By default if no kubelet network plugin is specified, the `noop` plugin is used,
|
|||||||
|
|
||||||
### Exec
|
### Exec
|
||||||
|
|
||||||
Place plugins in `network-plugin-dir/plugin-name/plugin-name`, i.e if you have a bridge plugin and `network-plugin-dir` is `/usr/lib/kubernetes`, you'd place the bridge plugin executable at `/usr/lib/kubernetes/bridge/bridge`. See [this comment](https://github.com/kubernetes/kubernetes/tree/{{page.version}}/pkg/kubelet/network/exec/exec.go) for more details.
|
Place plugins in `network-plugin-dir/plugin-name/plugin-name`, i.e. if you have a bridge plugin and `network-plugin-dir` is `/usr/lib/kubernetes`, you'd place the bridge plugin executable at `/usr/lib/kubernetes/bridge/bridge`. See [this comment](https://github.com/kubernetes/kubernetes/tree/{{page.version}}/pkg/kubelet/network/exec/exec.go) for more details.
|
||||||
|
|
||||||
### CNI
|
### CNI
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ Lars Kellogg-Stedman.
|
|||||||
|
|
||||||
[Nuage](http://www.nuagenetworks.net) provides a highly scalable policy-based Software-Defined Networking (SDN) platform. Nuage uses the open source Open vSwitch for the data plane along with a feature rich SDN Controller built on open standards.
|
[Nuage](http://www.nuagenetworks.net) provides a highly scalable policy-based Software-Defined Networking (SDN) platform. Nuage uses the open source Open vSwitch for the data plane along with a feature rich SDN Controller built on open standards.
|
||||||
|
|
||||||
The Nuage platform uses overlays to provide seamless policy-based networking between Kubernetes Pods and non-Kubernetes environments (VMs and bare metal servers). Nuage’s policy abstraction model is designed with applications in mind and makes it easy to declare fine-grained policies for applications.The platform’s real-time analytics engine enables visibility and security monitoring for Kubernetes applications.
|
The Nuage platform uses overlays to provide seamless policy-based networking between Kubernetes Pods and non-Kubernetes environments (VMs and bare metal servers). Nuage's policy abstraction model is designed with applications in mind and makes it easy to declare fine-grained policies for applications.The platform's real-time analytics engine enables visibility and security monitoring for Kubernetes applications.
|
||||||
|
|
||||||
### OpenVSwitch
|
### OpenVSwitch
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ either `kubectl` or addon pod.
|
|||||||
|
|
||||||
### Kubectl
|
### Kubectl
|
||||||
|
|
||||||
This is the recommanded way to start node problem detector outside of GCE. It
|
This is the recommended way to start node problem detector outside of GCE. It
|
||||||
provides more flexible management, such as overwriting the default
|
provides more flexible management, such as overwriting the default
|
||||||
configuration to fit it into your environment or detect
|
configuration to fit it into your environment or detect
|
||||||
customized node problems.
|
customized node problems.
|
||||||
@@ -238,7 +238,7 @@ implement a new translator for a new log format.
|
|||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
It is recommanded to run the node problem detector in your cluster to monitor
|
It is recommended to run the node problem detector in your cluster to monitor
|
||||||
the node health. However, you should be aware that this will introduce extra
|
the node health. However, you should be aware that this will introduce extra
|
||||||
resource overhead on each node. Usually this is fine, because:
|
resource overhead on each node. Usually this is fine, because:
|
||||||
|
|
||||||
|
|||||||
+10
-2
@@ -20,7 +20,15 @@ architecture design doc for more details.
|
|||||||
|
|
||||||
## Node Status
|
## Node Status
|
||||||
|
|
||||||
A node's status is comprised of the following information.
|
A node's status contains the following information:
|
||||||
|
|
||||||
|
* [Addresses](#Addresses)
|
||||||
|
* ~~[Phase](#Phase)~~ **deprecated**
|
||||||
|
* [Condition](#Condition)
|
||||||
|
* [Capacity](#Capacity)
|
||||||
|
* [Info](#Info)
|
||||||
|
|
||||||
|
Each section is described in detail below.
|
||||||
|
|
||||||
### Addresses
|
### Addresses
|
||||||
|
|
||||||
@@ -236,6 +244,6 @@ on each kubelet where you want to reserve resources.
|
|||||||
|
|
||||||
## API Object
|
## API Object
|
||||||
|
|
||||||
Node is a top-level resource in the kubernetes REST API. More details about the
|
Node is a top-level resource in the Kubernetes REST API. More details about the
|
||||||
API object can be found at: [Node API
|
API object can be found at: [Node API
|
||||||
object](/docs/api-reference/v1/definitions/#_v1_node).
|
object](/docs/api-reference/v1/definitions/#_v1_node).
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ for eviction. Instead `DaemonSet` should ideally launch `Guaranteed` pods.
|
|||||||
`kubelet` has been freeing up disk space on demand to keep the node stable.
|
`kubelet` has been freeing up disk space on demand to keep the node stable.
|
||||||
|
|
||||||
As disk based eviction matures, the following `kubelet` flags will be marked for deprecation
|
As disk based eviction matures, the following `kubelet` flags will be marked for deprecation
|
||||||
in favor of the simpler configuation supported around eviction.
|
in favor of the simpler configuration supported around eviction.
|
||||||
|
|
||||||
| Existing Flag | New Flag |
|
| Existing Flag | New Flag |
|
||||||
| ------------- | -------- |
|
| ------------- | -------- |
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ given the pods that are already running in the cluster
|
|||||||
the rescheduler tries to free up space for the add-on by evicting some pods; then the scheduler will schedule the add-on pod.
|
the rescheduler tries to free up space for the add-on by evicting some pods; then the scheduler will schedule the add-on pod.
|
||||||
|
|
||||||
To avoid situation when another pod is scheduled into the space prepared for the critical add-on,
|
To avoid situation when another pod is scheduled into the space prepared for the critical add-on,
|
||||||
the chosen node gets a temporary taint “CriticalAddonsOnly” before the eviction(s)
|
the chosen node gets a temporary taint "CriticalAddonsOnly" before the eviction(s)
|
||||||
(see [more details](https://github.com/kubernetes/kubernetes/blob/master/docs/design/taint-toleration-dedicated.md)).
|
(see [more details](https://github.com/kubernetes/kubernetes/blob/master/docs/design/taint-toleration-dedicated.md)).
|
||||||
Each critical add-on has to tolerate it,
|
Each critical add-on has to tolerate it,
|
||||||
the other pods shouldn't tolerate the taint. The tain is removed once the add-on is successfully scheduled.
|
the other pods shouldn't tolerate the taint. The tain is removed once the add-on is successfully scheduled.
|
||||||
@@ -50,11 +50,10 @@ It's enabled by default. It can be disabled:
|
|||||||
|
|
||||||
### Marking add-on as critical
|
### Marking add-on as critical
|
||||||
|
|
||||||
To be critical an add-on has to run in `kube-system` namespace (cofigurable via flag)
|
To be critical an add-on has to run in `kube-system` namespace (configurable via flag)
|
||||||
and have the following annotations specified:
|
and have the following annotations specified:
|
||||||
|
|
||||||
* `scheduler.alpha.kubernetes.io/critical-pod` set to empty string
|
* `scheduler.alpha.kubernetes.io/critical-pod` set to empty string
|
||||||
* `scheduler.alpha.kubernetes.io/tolerations` set to `[{"key":"CriticalAddonsOnly", "operator":"Exists"}]`
|
* `scheduler.alpha.kubernetes.io/tolerations` set to `[{"key":"CriticalAddonsOnly", "operator":"Exists"}]`
|
||||||
|
|
||||||
The first one marks a pod a critical. The second one is required by Rescheduler algorithm.
|
The first one marks a pod a critical. The second one is required by Rescheduler algorithm.
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ assignees:
|
|||||||
|
|
||||||
This document describes how sysctls are used within a Kubernetes cluster.
|
This document describes how sysctls are used within a Kubernetes cluster.
|
||||||
|
|
||||||
## What is a _Sysctl_?
|
## What is a Sysctl?
|
||||||
|
|
||||||
In Linux, the sysctl interface allows an administrator to modify kernel
|
In Linux, the sysctl interface allows an administrator to modify kernel
|
||||||
parameters at runtime. Parameters are available via the `/proc/sys/` virtual
|
parameters at runtime. Parameters are available via the `/proc/sys/` virtual
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
---
|
---
|
||||||
# API Reference
|
# API Reference
|
||||||
|
|
||||||
Use the following reference docs to understand the kubernetes REST API for various API group versions:
|
Use the following reference docs to understand the Kubernetes REST API for various API group versions:
|
||||||
|
|
||||||
* v1: [operations](/docs/api-reference/v1/operations.html), [model definitions](/docs/api-reference/v1/definitions.html)
|
* v1: [operations](/docs/api-reference/v1/operations.html), [model definitions](/docs/api-reference/v1/definitions.html)
|
||||||
* extensions/v1beta1: [operations](/docs/api-reference/extensions/v1beta1/operations.html), [model definitions](/docs/api-reference/extensions/v1beta1/definitions.html)
|
* extensions/v1beta1: [operations](/docs/api-reference/extensions/v1beta1/operations.html), [model definitions](/docs/api-reference/extensions/v1beta1/definitions.html)
|
||||||
|
|||||||
@@ -6320,7 +6320,7 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e. this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Example: `beta.kubernetes.io/os=linux`
|
|||||||
Used on: Node
|
Used on: Node
|
||||||
|
|
||||||
Kubelet populates this with `runtime.GOOS` as defined by Go. This can be handy if you are mixing operating systems
|
Kubelet populates this with `runtime.GOOS` as defined by Go. This can be handy if you are mixing operating systems
|
||||||
in your cluster (although currently Linux is the only OS supported by kubernetes).
|
in your cluster (although currently Linux is the only OS supported by Kubernetes).
|
||||||
|
|
||||||
## kubernetes.io/hostname
|
## kubernetes.io/hostname
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ Used on: Node
|
|||||||
|
|
||||||
Kubelet populates this with the instance type as defined by the `cloudprovider`. It will not be set if
|
Kubelet populates this with the instance type as defined by the `cloudprovider`. It will not be set if
|
||||||
not using a cloudprovider. This can be handy if you want to target certain workloads to certain instance
|
not using a cloudprovider. This can be handy if you want to target certain workloads to certain instance
|
||||||
types, but typically you want to rely on the kubernetes scheduler to perform resource-based scheduling,
|
types, but typically you want to rely on the Kubernetes scheduler to perform resource-based scheduling,
|
||||||
and you should aim to schedule based on properties rather than on instance types (e.g. require a GPU, instead
|
and you should aim to schedule based on properties rather than on instance types (e.g. require a GPU, instead
|
||||||
of requiring a `g2.2xlarge`)
|
of requiring a `g2.2xlarge`)
|
||||||
|
|
||||||
|
|||||||
@@ -5240,7 +5240,7 @@ Both these may change in the future. Incoming requests are matched against the h
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">path</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e. this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a <em>/</em>. If unspecified, the path defaults to a catch all sending traffic to the backend.</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
|
||||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||||
<td class="tableblock halign-left valign-top"></td>
|
<td class="tableblock halign-left valign-top"></td>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ title: Running Kubernetes on CenturyLink Cloud
|
|||||||
* TOC
|
* TOC
|
||||||
{: toc}
|
{: toc}
|
||||||
|
|
||||||
These scripts handle the creation, deletion and expansion of kubernetes clusters on CenturyLink Cloud.
|
These scripts handle the creation, deletion and expansion of Kubernetes clusters on CenturyLink Cloud.
|
||||||
|
|
||||||
You can accomplish all these tasks with a single command. We have made the Ansible playbooks used to perform these tasks available [here](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md).
|
You can accomplish all these tasks with a single command. We have made the Ansible playbooks used to perform these tasks available [here](https://github.com/CenturyLinkCloud/adm-kubernetes-on-clc/blob/master/ansible/README.md).
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ You can accomplish all these tasks with a single command. We have made the Ansib
|
|||||||
|
|
||||||
If you run into any problems or want help with anything, we are here to help. Reach out to use via any of the following ways:
|
If you run into any problems or want help with anything, we are here to help. Reach out to use via any of the following ways:
|
||||||
- Submit a github issue
|
- Submit a github issue
|
||||||
- Send an email to kubernetes AT ctl DOT io
|
- Send an email to Kubernetes AT ctl DOT io
|
||||||
- Visit http://info.ctl.io/kubernetes
|
- Visit http://info.ctl.io/kubernetes
|
||||||
|
|
||||||
## Clusters of VMs or Physical Servers, your choice.
|
## Clusters of VMs or Physical Servers, your choice.
|
||||||
@@ -207,18 +207,18 @@ Create a cluster with name of k8s_3, 1 master node, and 10 worker minions (on VM
|
|||||||
|
|
||||||
## Cluster Features and Architecture
|
## Cluster Features and Architecture
|
||||||
|
|
||||||
We configue the Kubernetes cluster with the following features:
|
We configure the Kubernetes cluster with the following features:
|
||||||
|
|
||||||
* KubeDNS: DNS resolution and service discovery
|
* KubeDNS: DNS resolution and service discovery
|
||||||
* Heapster/InfluxDB: For metric collection. Needed for Grafana and auto-scaling.
|
* Heapster/InfluxDB: For metric collection. Needed for Grafana and auto-scaling.
|
||||||
* Grafana: Kubernetes/Docker metric dashboard
|
* Grafana: Kubernetes/Docker metric dashboard
|
||||||
* KubeUI: Simple web interface to view kubernetes state
|
* KubeUI: Simple web interface to view Kubernetes state
|
||||||
* Kube Dashboard: New web interface to interact with your cluster
|
* Kube Dashboard: New web interface to interact with your cluster
|
||||||
|
|
||||||
We use the following to create the kubernetes cluster:
|
We use the following to create the Kubernetes cluster:
|
||||||
|
|
||||||
* Kubernetes 1.1.7
|
* Kubernetes 1.1.7
|
||||||
* Unbuntu 14.04
|
* Ubuntu 14.04
|
||||||
* Flannel 0.5.4
|
* Flannel 0.5.4
|
||||||
* Docker 1.9.1-0~trusty
|
* Docker 1.9.1-0~trusty
|
||||||
* Etcd 2.2.2
|
* Etcd 2.2.2
|
||||||
@@ -233,7 +233,7 @@ We use the following to create the kubernetes cluster:
|
|||||||
|
|
||||||
## Cluster management
|
## Cluster management
|
||||||
|
|
||||||
The most widely used tool for managing a kubernetes cluster is the command-line
|
The most widely used tool for managing a Kubernetes cluster is the command-line
|
||||||
utility ```kubectl```. If you do not already have a copy of this binary on your
|
utility ```kubectl```. If you do not already have a copy of this binary on your
|
||||||
administrative machine, you may run the script ```install_kubectl.sh``` which will
|
administrative machine, you may run the script ```install_kubectl.sh``` which will
|
||||||
download it and install it in ```/usr/bin/local```.
|
download it and install it in ```/usr/bin/local```.
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Some variables can be edited in the `k8s.yml` file.
|
|||||||
k8s_instance_type: Tiny
|
k8s_instance_type: Tiny
|
||||||
|
|
||||||
This will start a Kubernetes master node and a number of compute nodes (by default 2).
|
This will start a Kubernetes master node and a number of compute nodes (by default 2).
|
||||||
The `instance_type` and `template` by default are specific to [exoscale](http://exoscale.ch), edit them to specify your CloudStack cloud specific template and instance type (i.e service offering).
|
The `instance_type` and `template` by default are specific to [exoscale](http://exoscale.ch), edit them to specify your CloudStack cloud specific template and instance type (i.e. service offering).
|
||||||
|
|
||||||
Check the tasks and templates in `roles/k8s` if you want to modify anything.
|
Check the tasks and templates in `roles/k8s` if you want to modify anything.
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Configuring Kubernetes on Fedora via Ansible offers a simple way to quickly crea
|
|||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
1. Host able to run ansible and able to clone the following repo: [kubernetes](https://github.com/kubernetes/kubernetes.git)
|
1. Host able to run ansible and able to clone the following repo: [Kubernetes](https://github.com/kubernetes/kubernetes.git)
|
||||||
2. A Fedora 21+ host to act as cluster master
|
2. A Fedora 21+ host to act as cluster master
|
||||||
3. As many Fedora 21+ hosts as you would like, that act as cluster nodes
|
3. As many Fedora 21+ hosts as you would like, that act as cluster nodes
|
||||||
|
|
||||||
@@ -101,9 +101,9 @@ Although the default value of variables in `~/contrib/ansible/group_vars/all.yml
|
|||||||
edit: ~/contrib/ansible/group_vars/all.yml
|
edit: ~/contrib/ansible/group_vars/all.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
**Configure access to kubernetes packages**
|
**Configure access to Kubernetes packages**
|
||||||
|
|
||||||
Modify `source_type` as below to access kubernetes packages through the package manager.
|
Modify `source_type` as below to access Kubernetes packages through the package manager.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
source_type: packageManager
|
source_type: packageManager
|
||||||
@@ -156,7 +156,7 @@ cd ~/contrib/ansible/
|
|||||||
|
|
||||||
That's all there is to it. It's really that easy. At this point you should have a functioning Kubernetes cluster.
|
That's all there is to it. It's really that easy. At this point you should have a functioning Kubernetes cluster.
|
||||||
|
|
||||||
**Show kubernetes nodes**
|
**Show Kubernetes nodes**
|
||||||
|
|
||||||
Run the following on the kube-master:
|
Run the following on the kube-master:
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ fed-node = 192.168.121.65
|
|||||||
|
|
||||||
**Prepare the hosts:**
|
**Prepare the hosts:**
|
||||||
|
|
||||||
* Install Kubernetes on all hosts - fed-{master,node}. This will also pull in docker. Also install etcd on fed-master. This guide has been tested with kubernetes-0.18 and beyond.
|
* Install Kubernetes on all hosts - fed-{master,node}. This will also pull in docker. Also install etcd on fed-master. This guide has been tested with Kubernetes-0.18 and beyond.
|
||||||
* Running on AWS EC2 with RHEL 7.2, you need to enable "extras" repository for yum by editing `/etc/yum.repos.d/redhat-rhui.repo` and changing the changing the `enable=0` to `enable=1` for extras.
|
* Running on AWS EC2 with RHEL 7.2, you need to enable "extras" repository for yum by editing `/etc/yum.repos.d/redhat-rhui.repo` and changing the changing the `enable=0` to `enable=1` for extras.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ kops uses DNS for discovery, both inside the cluster and so that you can reach t
|
|||||||
from clients.
|
from clients.
|
||||||
|
|
||||||
kops has a strong opinion on the cluster name: it should be a valid DNS name. By doing so you will
|
kops has a strong opinion on the cluster name: it should be a valid DNS name. By doing so you will
|
||||||
no longer get your clusters confused, you can share clusters with your colleagues unambigiously,
|
no longer get your clusters confused, you can share clusters with your colleagues unambiguously,
|
||||||
and you can reach them without relying on remembering an IP address.
|
and you can reach them without relying on remembering an IP address.
|
||||||
|
|
||||||
You can, and probably should, use subdomains to divide your clusters. As our example we will use
|
You can, and probably should, use subdomains to divide your clusters. As our example we will use
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ If you are on MacOS and using brew, you can install with:
|
|||||||
brew install kubectl
|
brew install kubectl
|
||||||
```
|
```
|
||||||
|
|
||||||
The homebrew project is independent from kubernetes, so do check that the version is
|
The homebrew project is independent from Kubernetes, so do check that the version is
|
||||||
sufficiently up-to-date using `kubectl version`.
|
sufficiently up-to-date using `kubectl version`.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Another difference is that no security is enforced on `libvirt-coreos` at all. F
|
|||||||
* Kubernetes secrets are not protected as securely as they are on production environments;
|
* Kubernetes secrets are not protected as securely as they are on production environments;
|
||||||
* etc.
|
* etc.
|
||||||
|
|
||||||
So, an k8s application developer should not validate its interaction with Kubernetes on `libvirt-coreos` because he might technically succeed in doing things that are prohibited on a production environment like:
|
So, a k8s application developer should not validate its interaction with Kubernetes on `libvirt-coreos` because he might technically succeed in doing things that are prohibited on a production environment like:
|
||||||
|
|
||||||
* un-authenticated access to Kube API server;
|
* un-authenticated access to Kube API server;
|
||||||
* Access to Kubernetes private data structures inside etcd;
|
* Access to Kubernetes private data structures inside etcd;
|
||||||
@@ -45,7 +45,7 @@ On the other hand, `libvirt-coreos` might be useful for people investigating low
|
|||||||
3. Install [qemu](http://wiki.qemu.org/Main_Page)
|
3. Install [qemu](http://wiki.qemu.org/Main_Page)
|
||||||
4. Install [libvirt](http://libvirt.org/)
|
4. Install [libvirt](http://libvirt.org/)
|
||||||
5. Install [openssl](http://openssl.org/)
|
5. Install [openssl](http://openssl.org/)
|
||||||
6. Enable and start the libvirt daemon, e.g:
|
6. Enable and start the libvirt daemon, e.g.:
|
||||||
* ``systemctl enable libvirtd && systemctl start libvirtd`` # for systemd-based systems
|
* ``systemctl enable libvirtd && systemctl start libvirtd`` # for systemd-based systems
|
||||||
* ``/etc/init.d/libvirt-bin start`` # for init.d-based systems
|
* ``/etc/init.d/libvirt-bin start`` # for init.d-based systems
|
||||||
7. [Grant libvirt access to your user¹](https://libvirt.org/aclpolkit.html)
|
7. [Grant libvirt access to your user¹](https://libvirt.org/aclpolkit.html)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ root 479 0.0 0.0 4348 812 ? S 00:05 0:00 sleep 1
|
|||||||
root 480 0.0 0.0 15572 2212 ? R 00:05 0:00 ps aux
|
root 480 0.0 0.0 15572 2212 ? R 00:05 0:00 ps aux
|
||||||
```
|
```
|
||||||
|
|
||||||
What happens if for any reason the image in this pod is killed off and then restarted by Kubernetes? Will we still see the log lines from the previous invocation of the container followed by the log lines for the started container? Or will we lose the log lines from the original container's execution and only see the log lines for the new container? Let’s find out. First let's delete the currently running counter.
|
What happens if for any reason the image in this pod is killed off and then restarted by Kubernetes? Will we still see the log lines from the previous invocation of the container followed by the log lines for the started container? Or will we lose the log lines from the original container's execution and only see the log lines for the new container? Let's find out. First let's delete the currently running counter.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ kubectl delete pod counter
|
$ kubectl delete pod counter
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ Thankfully, there is a system we can use to manage our containers in a cluster e
|
|||||||
|
|
||||||
## The Basics of Using Kubernetes
|
## The Basics of Using Kubernetes
|
||||||
|
|
||||||
Before we jump in and start kube’ing it up, it’s important to understand some of the fundamentals of Kubernetes.
|
Before we jump in and start kube'ing it up, it's important to understand some of the fundamentals of Kubernetes.
|
||||||
|
|
||||||
* Containers: These are the Docker, rtk, AppC, or whatever Container you are running. You can think of these like subatomic particles; everything is made up of them, but you rarely (if ever) interact with them directly.
|
* Containers: These are the Docker, rtk, AppC, or whatever Container you are running. You can think of these like subatomic particles; everything is made up of them, but you rarely (if ever) interact with them directly.
|
||||||
* Pods: Pods are the basic component of Kubernetes. They are a group of Containers that are scheduled, live, and die together. Why would you want to have a group of containers instead of just a single container? Let’s say you had a log processor, a web server, and a database. If you couldn't use Pods, you would have to bundle the log processor in the web server and database containers, and each time you updated one you would have to update the other. With Pods, you can just reuse the same log processor for both the web server and database.
|
* Pods: Pods are the basic component of Kubernetes. They are a group of Containers that are scheduled, live, and die together. Why would you want to have a group of containers instead of just a single container? Let's say you had a log processor, a web server, and a database. If you couldn't use Pods, you would have to bundle the log processor in the web server and database containers, and each time you updated one you would have to update the other. With Pods, you can just reuse the same log processor for both the web server and database.
|
||||||
* Deployments: A Deployment provides declarative updates for Pods. You can define Deployments to create new Pods, or replace existing Pods. You only need to describe the desired state in a Deployment object, and the deployment controller will change the actual state to the desired state at a controlled rate for you. You can define Deployments to create new resources, or replace existing ones by new ones.
|
* Deployments: A Deployment provides declarative updates for Pods. You can define Deployments to create new Pods, or replace existing Pods. You only need to describe the desired state in a Deployment object, and the deployment controller will change the actual state to the desired state at a controlled rate for you. You can define Deployments to create new resources, or replace existing ones by new ones.
|
||||||
* Services: A service is the single point of contact for a group of Pods. For example, let’s say you have a Deployment that creates four copies of a web server pod. A Service will split the traffic to each of the four copies. Services are "permanent" while the pods behind them can come and go, so it’s a good idea to use Services.
|
* Services: A service is the single point of contact for a group of Pods. For example, let's say you have a Deployment that creates four copies of a web server pod. A Service will split the traffic to each of the four copies. Services are "permanent" while the pods behind them can come and go, so it's a good idea to use Services.
|
||||||
|
|
||||||
|
|
||||||
## Step 1: Creating the Container
|
## Step 1: Creating the Container
|
||||||
@@ -37,7 +37,7 @@ To do this, you need to use more Docker. Make sure you have the latest version i
|
|||||||
|
|
||||||
Getting the code:
|
Getting the code:
|
||||||
|
|
||||||
Before starting, let’s get some code to run. You can follow along on your personal machine or a Linux VM in the cloud. I recommend using Linux or a Linux VM; running Docker on Mac and Windows is outside the scope of this tutorial.
|
Before starting, let's get some code to run. You can follow along on your personal machine or a Linux VM in the cloud. I recommend using Linux or a Linux VM; running Docker on Mac and Windows is outside the scope of this tutorial.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ git clone https://github.com/ijason/NodeJS-Sample-App.git app
|
$ git clone https://github.com/ijason/NodeJS-Sample-App.git app
|
||||||
@@ -45,7 +45,7 @@ $ mv app/EmployeeDB/* app/
|
|||||||
$ sed -i -- 's/localhost/mongo/g' ./app/app.js
|
$ sed -i -- 's/localhost/mongo/g' ./app/app.js
|
||||||
```
|
```
|
||||||
|
|
||||||
This is the same sample app we ran before. The second line just moves everything from the `EmployeeDB` subfolder up into the app folder so it’s easier to access. The third line, once again, replaces the hardcoded `localhost` with the `mongo` proxy.
|
This is the same sample app we ran before. The second line just moves everything from the `EmployeeDB` subfolder up into the app folder so it's easier to access. The third line, once again, replaces the hardcoded `localhost` with the `mongo` proxy.
|
||||||
|
|
||||||
Building the Docker image:
|
Building the Docker image:
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ $ ls
|
|||||||
Dockerfile app
|
Dockerfile app
|
||||||
```
|
```
|
||||||
|
|
||||||
Let’s build.
|
Let's build.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ docker build -t myapp .
|
$ docker build -t myapp .
|
||||||
@@ -139,7 +139,7 @@ After some time, it will finish. You can check the console to see the container
|
|||||||
|
|
||||||
## **Step 4: Creating the Cluster**
|
## **Step 4: Creating the Cluster**
|
||||||
|
|
||||||
So now you have the custom container, let’s create a cluster to run it.
|
So now you have the custom container, let's create a cluster to run it.
|
||||||
|
|
||||||
Currently, a cluster can be as small as one machine to as big as 100 machines. You can pick any machine type you want, so you can have a cluster of a single `f1-micro` instance, 100 `n1-standard-32` instances (3,200 cores!), and anything in between.
|
Currently, a cluster can be as small as one machine to as big as 100 machines. You can pick any machine type you want, so you can have a cluster of a single `f1-micro` instance, 100 `n1-standard-32` instances (3,200 cores!), and anything in between.
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ $ gcloud compute disks create \
|
|||||||
|
|
||||||
Pick the same zone as your cluster and an appropriate disk size for your application.
|
Pick the same zone as your cluster and an appropriate disk size for your application.
|
||||||
|
|
||||||
Now, we need to create a Deployment that will run the database. I’m using a Deployment and not a Pod, because if a standalone Pod dies, it won't restart automatically.
|
Now, we need to create a Deployment that will run the database. I'm using a Deployment and not a Pod, because if a standalone Pod dies, it won't restart automatically.
|
||||||
|
|
||||||
### `db-deployment.yml`
|
### `db-deployment.yml`
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ We call the deployment `mongo-deployment`, specify one replica, and open the app
|
|||||||
|
|
||||||
The `volumes` section creates the volume for Kubernetes to use. There is a Google Container Engine-specific `gcePersistentDisk` section that maps the disk we made into a Kubernetes volume, and we mount the volume into the `/data/db` directory (as described in the MongoDB Docker documentation)
|
The `volumes` section creates the volume for Kubernetes to use. There is a Google Container Engine-specific `gcePersistentDisk` section that maps the disk we made into a Kubernetes volume, and we mount the volume into the `/data/db` directory (as described in the MongoDB Docker documentation)
|
||||||
|
|
||||||
Now we have the Deployment, let’s create the Service:
|
Now we have the Deployment, let's create the Service:
|
||||||
|
|
||||||
### `db-service.yml`
|
### `db-service.yml`
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ db-service.yml
|
|||||||
|
|
||||||
## Step 6: Running the Database
|
## Step 6: Running the Database
|
||||||
|
|
||||||
First, let’s "log in" to the cluster
|
First, let's "log in" to the cluster
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ gcloud container clusters get-credentials mean-cluster
|
$ gcloud container clusters get-credentials mean-cluster
|
||||||
@@ -305,14 +305,14 @@ mongo-deployment-xxxx 1/1 Running 0 3m
|
|||||||
|
|
||||||
## Step 7: Creating the Web Server
|
## Step 7: Creating the Web Server
|
||||||
|
|
||||||
Now the database is running, let’s start the web server.
|
Now the database is running, let's start the web server.
|
||||||
|
|
||||||
We need two things:
|
We need two things:
|
||||||
|
|
||||||
1. Deployment to spin up and down web server pods
|
1. Deployment to spin up and down web server pods
|
||||||
2. Service to expose our website to the interwebs
|
2. Service to expose our website to the interwebs
|
||||||
|
|
||||||
Let’s look at the Deployment configuration:
|
Let's look at the Deployment configuration:
|
||||||
|
|
||||||
### `web-deployment.yml`
|
### `web-deployment.yml`
|
||||||
|
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ We assume that kube-dns will use
|
|||||||
|
|
||||||
Note that we have passed these two values already as parameter to the apiserver above.
|
Note that we have passed these two values already as parameter to the apiserver above.
|
||||||
|
|
||||||
A template for an replication controller spinning up the pod with the 3 containers can be found at [cluster/addons/dns/skydns-rc.yaml.in][11] in the repository. The following steps are necessary in order to get a valid replication controller yaml file:
|
A template for a replication controller spinning up the pod with the 3 containers can be found at [cluster/addons/dns/skydns-rc.yaml.in][11] in the repository. The following steps are necessary in order to get a valid replication controller yaml file:
|
||||||
|
|
||||||
- replace `{% raw %}{{ pillar['dns_replicas'] }}{% endraw %}` with `1`
|
- replace `{% raw %}{{ pillar['dns_replicas'] }}{% endraw %}` with `1`
|
||||||
- replace `{% raw %}{{ pillar['dns_domain'] }}{% endraw %}` with `cluster.local.`
|
- replace `{% raw %}{{ pillar['dns_domain'] }}{% endraw %}` with `cluster.local.`
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ plugins, if required.
|
|||||||
|
|
||||||
### Reusing the Docker daemon
|
### Reusing the Docker daemon
|
||||||
|
|
||||||
When using a single VM of kubernetes, it's really handy to reuse the minikube's built-in Docker daemon; as this means you don't have to build a docker registry on your host machine and push the image into it - you can just build inside the same docker daemon as minikube which speeds up local experiments. Just make sure you tag your Docker image with something other than 'latest' and use that tag while you pull the image. Otherwise, if you do not specify version of your image, it will be assumed as `:latest`, with pull image policy of `Always` correspondingly, which may eventually result in `ErrImagePull` as you may not have any versions of your Docker image out there in the default docker registry (usually DockerHub) yet.
|
When using a single VM of Kubernetes, it's really handy to reuse the minikube's built-in Docker daemon; as this means you don't have to build a docker registry on your host machine and push the image into it - you can just build inside the same docker daemon as minikube which speeds up local experiments. Just make sure you tag your Docker image with something other than 'latest' and use that tag while you pull the image. Otherwise, if you do not specify version of your image, it will be assumed as `:latest`, with pull image policy of `Always` correspondingly, which may eventually result in `ErrImagePull` as you may not have any versions of your Docker image out there in the default docker registry (usually DockerHub) yet.
|
||||||
|
|
||||||
To be able to work with the docker daemon on your mac/linux host use the [docker-env command](./docs/minikube_docker-env.md) in your shell:
|
To be able to work with the docker daemon on your mac/linux host use the [docker-env command](./docs/minikube_docker-env.md) in your shell:
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ The fix is to update /etc/sysconfig/docker to ensure that minikube's environment
|
|||||||
> fi
|
> fi
|
||||||
```
|
```
|
||||||
|
|
||||||
Remember to turn off the imagePullPolicy:Always, as otherwise kubernetes won't use images you built locally.
|
Remember to turn off the imagePullPolicy:Always, as otherwise Kubernetes won't use images you built locally.
|
||||||
|
|
||||||
## Managing your Cluster
|
## Managing your Cluster
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ For more information about minikube, see the [proposal](https://github.com/kuber
|
|||||||
* **Development Guide**: See [CONTRIBUTING.md](https://github.com/kubernetes/minikube/blob/master/CONTRIBUTING.md) for an overview of how to send pull requests.
|
* **Development Guide**: See [CONTRIBUTING.md](https://github.com/kubernetes/minikube/blob/master/CONTRIBUTING.md) for an overview of how to send pull requests.
|
||||||
* **Building Minikube**: For instructions on how to build/test minikube from source, see the [build guide](https://github.com/kubernetes/minikube/blob/master/BUILD_GUIDE.md)
|
* **Building Minikube**: For instructions on how to build/test minikube from source, see the [build guide](https://github.com/kubernetes/minikube/blob/master/BUILD_GUIDE.md)
|
||||||
* **Adding a New Dependency**: For instructions on how to add a new dependency to minikube see the [adding dependencies guide](https://github.com/kubernetes/minikube/blob/master/ADD_DEPENDENCY.md)
|
* **Adding a New Dependency**: For instructions on how to add a new dependency to minikube see the [adding dependencies guide](https://github.com/kubernetes/minikube/blob/master/ADD_DEPENDENCY.md)
|
||||||
* **Updating Kubernetes**: For instructions on how to add a new dependency to minikube see the [updating kubernetes guide](https://github.com/kubernetes/minikube/blob/master/UPDATE_KUBERNETES.md)
|
* **Updating Kubernetes**: For instructions on how to add a new dependency to minikube see the [updating Kubernetes guide](https://github.com/kubernetes/minikube/blob/master/UPDATE_KUBERNETES.md)
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ There are two main components to be aware of:
|
|||||||
- One `calico-node` Pod runs on each node in your cluster, and enforces network policy on the traffic to/from Pods on that machine by configuring iptables.
|
- One `calico-node` Pod runs on each node in your cluster, and enforces network policy on the traffic to/from Pods on that machine by configuring iptables.
|
||||||
- The `calico-policy-controller` Pod reads policy and label information from the Kubernetes API and configures Calico appropriately.
|
- The `calico-policy-controller` Pod reads policy and label information from the Kubernetes API and configures Calico appropriately.
|
||||||
|
|
||||||
Once your cluster is running, you can follow the [NetworkPolicy gettting started guide](/docs/getting-started-guides/network-policy/walkthrough) to try out Kubernetes NetworkPolicy.
|
Once your cluster is running, you can follow the [NetworkPolicy getting started guide](/docs/getting-started-guides/network-policy/walkthrough) to try out Kubernetes NetworkPolicy.
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ The [Weave Net Addon](https://www.weave.works/docs/net/latest/kube-addon/) for K
|
|||||||
|
|
||||||
This component automatically monitors Kubernetes for any NetworkPolicy annotations on all namespaces, and configures `iptables` rules to allow or block traffic as directed by the policies.
|
This component automatically monitors Kubernetes for any NetworkPolicy annotations on all namespaces, and configures `iptables` rules to allow or block traffic as directed by the policies.
|
||||||
|
|
||||||
Once you have installed the Weave Net Addon you can follow the [NetworkPolicy gettting started guide](/docs/getting-started-guides/network-policy/walkthrough) to try out Kubernetes NetworkPolicy.
|
Once you have installed the Weave Net Addon you can follow the [NetworkPolicy getting started guide](/docs/getting-started-guides/network-policy/walkthrough) to try out Kubernetes NetworkPolicy.
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ balancer. Specifically:
|
|||||||
Configure your service with the NodePort option. For example, this
|
Configure your service with the NodePort option. For example, this
|
||||||
service uses the NodePort option. All Kubernetes nodes will listen on
|
service uses the NodePort option. All Kubernetes nodes will listen on
|
||||||
a port and forward network traffic to any pods in the service. In this
|
a port and forward network traffic to any pods in the service. In this
|
||||||
case, Kubernets will choose a random port, but it will be the same
|
case, Kubernetes will choose a random port, but it will be the same
|
||||||
port on all nodes.
|
port on all nodes.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ There is a specific `cluster/rackspace` directory with the scripts for the follo
|
|||||||
|
|
||||||
1. A cloud network will be created and all instances will be attached to this network.
|
1. A cloud network will be created and all instances will be attached to this network.
|
||||||
- flanneld uses this network for next hop routing. These routes allow the containers running on each node to communicate with one another on this private network.
|
- flanneld uses this network for next hop routing. These routes allow the containers running on each node to communicate with one another on this private network.
|
||||||
2. A SSH key will be created and uploaded if needed. This key must be used to ssh into the machines (we do not capture the password).
|
2. An SSH key will be created and uploaded if needed. This key must be used to ssh into the machines (we do not capture the password).
|
||||||
3. The master server and additional nodes will be created via the `nova` CLI. A `cloud-config.yaml` is generated and provided as user-data with the entire configuration for the systems.
|
3. The master server and additional nodes will be created via the `nova` CLI. A `cloud-config.yaml` is generated and provided as user-data with the entire configuration for the systems.
|
||||||
4. We then boot as many nodes as defined via `$NUM_NODES`.
|
4. We then boot as many nodes as defined via `$NUM_NODES`.
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ accomplished in two ways:
|
|||||||
|
|
||||||
- **Using an overlay network**
|
- **Using an overlay network**
|
||||||
- An overlay network obscures the underlying network architecture from the
|
- An overlay network obscures the underlying network architecture from the
|
||||||
pod network through traffic encapsulation (e.g vxlan).
|
pod network through traffic encapsulation (e.g. vxlan).
|
||||||
- Encapsulation reduces performance, though exactly how much depends on your solution.
|
- Encapsulation reduces performance, though exactly how much depends on your solution.
|
||||||
- **Without an overlay network**
|
- **Without an overlay network**
|
||||||
- Configure the underlying network fabric (switches, routers, etc.) to be aware of pod IP addresses.
|
- Configure the underlying network fabric (switches, routers, etc.) to be aware of pod IP addresses.
|
||||||
@@ -180,7 +180,7 @@ we recommend that you run these as containers, so you need an image to be built.
|
|||||||
You have several choices for Kubernetes images:
|
You have several choices for Kubernetes images:
|
||||||
|
|
||||||
- Use images hosted on Google Container Registry (GCR):
|
- Use images hosted on Google Container Registry (GCR):
|
||||||
- e.g `gcr.io/google_containers/hyperkube:$TAG`, where `TAG` is the latest
|
- e.g. `gcr.io/google_containers/hyperkube:$TAG`, where `TAG` is the latest
|
||||||
release tag, which can be found on the [latest releases page](https://github.com/kubernetes/kubernetes/releases/latest).
|
release tag, which can be found on the [latest releases page](https://github.com/kubernetes/kubernetes/releases/latest).
|
||||||
- Ensure $TAG is the same tag as the release tag you are using for kubelet and kube-proxy.
|
- Ensure $TAG is the same tag as the release tag you are using for kubelet and kube-proxy.
|
||||||
- The [hyperkube](https://releases.k8s.io/{{page.githubbranch}}/cmd/hyperkube) binary is an all in one binary
|
- The [hyperkube](https://releases.k8s.io/{{page.githubbranch}}/cmd/hyperkube) binary is an all in one binary
|
||||||
@@ -822,7 +822,7 @@ of their purpose is in the admin guide](/docs/admin/cluster-components/#addons).
|
|||||||
Notes for setting up each cluster service are given below:
|
Notes for setting up each cluster service are given below:
|
||||||
|
|
||||||
* Cluster DNS:
|
* Cluster DNS:
|
||||||
* required for many kubernetes examples
|
* required for many Kubernetes examples
|
||||||
* [Setup instructions](http://releases.k8s.io/{{page.githubbranch}}/cluster/addons/dns/)
|
* [Setup instructions](http://releases.k8s.io/{{page.githubbranch}}/cluster/addons/dns/)
|
||||||
* [Admin Guide](/docs/admin/dns/)
|
* [Admin Guide](/docs/admin/dns/)
|
||||||
* Cluster-level Logging
|
* Cluster-level Logging
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ Note that each controller can host multiple Kubernetes clusters in a given cloud
|
|||||||
|
|
||||||
## Launch a Kubernetes cluster
|
## Launch a Kubernetes cluster
|
||||||
|
|
||||||
The following command will deploy the intial 12-node starter cluster. The speed of execution is very dependent of the performance of the cloud you're deploying to, but
|
The following command will deploy the initial 12-node starter cluster. The speed of execution is very dependent of the performance of the cloud you're deploying to, but
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
juju deploy canonical-kubernetes
|
juju deploy canonical-kubernetes
|
||||||
@@ -206,7 +206,7 @@ Congratulations, you've now set up a Kubernetes cluster!
|
|||||||
Want larger Kubernetes nodes? It is easy to request different sizes of cloud
|
Want larger Kubernetes nodes? It is easy to request different sizes of cloud
|
||||||
resources from Juju by using **constraints**. You can increase the amount of
|
resources from Juju by using **constraints**. You can increase the amount of
|
||||||
CPU or memory (RAM) in any of the systems requested by Juju. This allows you
|
CPU or memory (RAM) in any of the systems requested by Juju. This allows you
|
||||||
to fine tune th Kubernetes cluster to fit your workload. Use flags on the
|
to fine tune the Kubernetes cluster to fit your workload. Use flags on the
|
||||||
bootstrap command or as a separate `juju constraints` command. Look to the
|
bootstrap command or as a separate `juju constraints` command. Look to the
|
||||||
[Juju documentation for machine](https://jujucharms.com/docs/2.0/charms-constraints)
|
[Juju documentation for machine](https://jujucharms.com/docs/2.0/charms-constraints)
|
||||||
details.
|
details.
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ On your compute nodes, it is important that you install Calico before Kubernetes
|
|||||||
|
|
||||||
## Configure kubectl remote access
|
## Configure kubectl remote access
|
||||||
|
|
||||||
To administer your cluster from a separate host (e.g your laptop), you will need the root CA generated earlier, as well as an admin public/private keypair (`ca.pem`, `admin.pem`, `admin-key.pem`). Run the following steps on the machine which you will use to control your cluster.
|
To administer your cluster from a separate host (e.g. your laptop), you will need the root CA generated earlier, as well as an admin public/private keypair (`ca.pem`, `admin.pem`, `admin-key.pem`). Run the following steps on the machine which you will use to control your cluster.
|
||||||
|
|
||||||
1. Download the kubectl binary.
|
1. Download the kubectl binary.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ assignees:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
This document describes how to deploy kubernetes on ubuntu nodes, 1 master and 3 nodes involved
|
This document describes how to deploy Kubernetes on ubuntu nodes, 1 master and 3 nodes involved
|
||||||
in the given examples. You can scale to **any number of nodes** by changing some settings with ease.
|
in the given examples. You can scale to **any number of nodes** by changing some settings with ease.
|
||||||
The original idea was heavily inspired by @jainvipin 's ubuntu single node
|
The original idea was heavily inspired by @jainvipin 's ubuntu single node
|
||||||
work, which has been merge into this document.
|
work, which has been merge into this document.
|
||||||
@@ -36,7 +36,7 @@ Ubuntu 15 which uses systemd instead of upstart.
|
|||||||
|
|
||||||
### Set up working directory
|
### Set up working directory
|
||||||
|
|
||||||
Clone the kubernetes github repo locally
|
Clone the Kubernetes github repo locally
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ git clone --depth 1 https://github.com/kubernetes/kubernetes.git
|
$ git clone --depth 1 https://github.com/kubernetes/kubernetes.git
|
||||||
@@ -101,7 +101,7 @@ acts as both master and node, "a" stands for master, "i" stands for node.
|
|||||||
|
|
||||||
The `NUM_NODES` variable defines the total number of nodes.
|
The `NUM_NODES` variable defines the total number of nodes.
|
||||||
|
|
||||||
The `SERVICE_CLUSTER_IP_RANGE` variable defines the kubernetes service IP range. Please make sure
|
The `SERVICE_CLUSTER_IP_RANGE` variable defines the Kubernetes service IP range. Please make sure
|
||||||
that you do have a valid private ip range defined here, because some IaaS provider may reserve private ips.
|
that you do have a valid private ip range defined here, because some IaaS provider may reserve private ips.
|
||||||
You can use below three private network range according to rfc1918. Besides you'd better not choose the one
|
You can use below three private network range according to rfc1918. Besides you'd better not choose the one
|
||||||
that conflicts with your own private network range.
|
that conflicts with your own private network range.
|
||||||
@@ -122,7 +122,7 @@ through `FLANNEL_BACKEND` and `FLANNEL_OTHER_NET_CONFIG`, as explained in `clust
|
|||||||
The default setting for `ADMISSION_CONTROL` is right for the latest
|
The default setting for `ADMISSION_CONTROL` is right for the latest
|
||||||
release of Kubernetes, but if you choose an earlier release then you
|
release of Kubernetes, but if you choose an earlier release then you
|
||||||
might want a different setting. See
|
might want a different setting. See
|
||||||
[the admisson control doc](http://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-plug-ins-to-use)
|
[the admission control doc](http://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-plug-ins-to-use)
|
||||||
for the recommended settings for various releases.
|
for the recommended settings for various releases.
|
||||||
|
|
||||||
**Note:** When deploying, master needs to be connected to the Internet to download the necessary files.
|
**Note:** When deploying, master needs to be connected to the Internet to download the necessary files.
|
||||||
@@ -138,7 +138,7 @@ bring up the whole cluster.
|
|||||||
$ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
|
$ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
The scripts automatically copy binaries and config files to all the machines via `scp` and start kubernetes
|
The scripts automatically copy binaries and config files to all the machines via `scp` and start Kubernetes
|
||||||
service on them. The only thing you need to do is to type the sudo password when promoted.
|
service on them. The only thing you need to do is to type the sudo password when promoted.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -211,7 +211,7 @@ After some time, you can use `$ kubectl get pods --namespace=kube-system` to see
|
|||||||
|
|
||||||
We are working on these features which we'd like to let everybody know:
|
We are working on these features which we'd like to let everybody know:
|
||||||
|
|
||||||
1. Run kubernetes binaries in Docker using [kube-in-docker](https://github.com/ZJU-SEL/kube-in-docker/tree/baremetal-kube),
|
1. Run Kubernetes binaries in Docker using [kube-in-docker](https://github.com/ZJU-SEL/kube-in-docker/tree/baremetal-kube),
|
||||||
to eliminate OS-distro differences.
|
to eliminate OS-distro differences.
|
||||||
2. Tearing Down scripts: clear and re-create the whole stack by one click.
|
2. Tearing Down scripts: clear and re-create the whole stack by one click.
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ $ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
|
|||||||
|
|
||||||
## Upgrading a Cluster
|
## Upgrading a Cluster
|
||||||
|
|
||||||
If you already have a kubernetes cluster, and want to upgrade to a new version,
|
If you already have a Kubernetes cluster, and want to upgrade to a new version,
|
||||||
you can use following command in `cluster/` directory to update the whole cluster
|
you can use following command in `cluster/` directory to update the whole cluster
|
||||||
or a specified node to a new version.
|
or a specified node to a new version.
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ The script will not delete any resources of your cluster, it just replaces the b
|
|||||||
|
|
||||||
### Test it out
|
### Test it out
|
||||||
|
|
||||||
You can use the `kubectl` command to check if the newly upgraded kubernetes cluster is working correctly.
|
You can use the `kubectl` command to check if the newly upgraded Kubernetes cluster is working correctly.
|
||||||
|
|
||||||
To make sure the version of the upgraded cluster is what you expect, you will find these commands helpful.
|
To make sure the version of the upgraded cluster is what you expect, you will find these commands helpful.
|
||||||
|
|
||||||
|
|||||||
@@ -5,19 +5,95 @@ assignees:
|
|||||||
title: VMware vSphere
|
title: VMware vSphere
|
||||||
---
|
---
|
||||||
|
|
||||||
The example below creates a Kubernetes cluster with 4 worker node Virtual
|
This page covers how to get started with deploying Kubernetes on vSphere and details for how to configure the vSphere Cloud Provider.
|
||||||
Machines and a master Virtual Machine (i.e. 5 VMs in your cluster). This
|
|
||||||
cluster is set up and controlled from your workstation (or wherever you find
|
|
||||||
convenient).
|
|
||||||
|
|
||||||
* TOC
|
* TOC
|
||||||
{:toc}
|
{:toc}
|
||||||
|
|
||||||
### Prerequisites
|
### Getting started with vSphere
|
||||||
|
|
||||||
1. You need administrator credentials to an ESXi machine or vCenter instance with write mode api access enabled (not available on the free ESXi license).
|
Kubernetes comes with a cloud provider for vSphere. A quick and easy way to try out the cloud provider is to deploy Kubernetes using [Kubernetes-Anywhere](https://github.com/kubernetes/kubernetes-anywhere).
|
||||||
2. You must have Go (see [here](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/docs/devel/development.md#go-versions) for supported versions) installed: [www.golang.org](http://www.golang.org).
|
|
||||||
3. You must have your `GOPATH` set up and include `$GOPATH/bin` in your `PATH`.
|
This page also describes how to configure and get started with the cloud provider if deploying using custom install scripts.
|
||||||
|
|
||||||
|
### Deploy Kubernetes on vSphere
|
||||||
|
|
||||||
|
To start using Kubernetes on top of vSphere and use the vSphere Cloud Provider use Kubernetes-Anywhere. Kubernetes-Anywhere will deploy and configure a cluster from scratch.
|
||||||
|
|
||||||
|
Detailed steps can be found at the [getting started with Kubernetes-Anywhere on vSphere page](https://github.com/kubernetes/kubernetes-anywhere/blob/master/phase1/vsphere/README.md)
|
||||||
|
|
||||||
|
### vSphere Cloud Provider
|
||||||
|
|
||||||
|
vSphere Cloud Provider allows using vSphere managed storage within Kubernetes. It supports:
|
||||||
|
|
||||||
|
1. Volumes
|
||||||
|
2. Persistent Volumes
|
||||||
|
3. Storage Classes and provisioning of volumes.
|
||||||
|
|
||||||
|
Documentation for how to use vSphere managed storage can be found in the
|
||||||
|
[persistent volumes user
|
||||||
|
guide](http://kubernetes.io/docs/user-guide/persistent-volumes/#vsphere) and the
|
||||||
|
[volumes user
|
||||||
|
guide](http://kubernetes.io/docs/user-guide/volumes/#vspherevolume)
|
||||||
|
|
||||||
|
Examples can be found
|
||||||
|
[here](https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/vsphere)
|
||||||
|
|
||||||
|
#### Configuring vSphere Cloud Provider
|
||||||
|
|
||||||
|
If a Kubernetes cluster has not been deployed using Kubernetes-Anywhere, follow the instructions below to use the vSphere Cloud Provider. These steps are not needed when using Kubernetes-Anywhere, they will be done as part of the deployment.
|
||||||
|
|
||||||
|
* Enable UUID for a VM
|
||||||
|
|
||||||
|
This can be done via [govc tool](https://github.com/vmware/govmomi/tree/master/govc)
|
||||||
|
|
||||||
|
```
|
||||||
|
export GOVC_URL=<IP/URL>
|
||||||
|
export GOVC_USERNAME=<vCenter User>
|
||||||
|
export GOVC_PASSWORD=<vCenter Password>
|
||||||
|
export GOVC_INSECURE=1
|
||||||
|
govc vm.change -e="disk.enableUUID=1" -vm=<VMNAME>
|
||||||
|
```
|
||||||
|
|
||||||
|
* Provide the cloud config file to each instance of kubelet, apiserver and controller manager via ```--cloud-config=<path to file>``` flag. Cloud config [template can be found at Kubernetes-Anywhere] (https://github.com/kubernetes/kubernetes-anywhere/blob/master/phase1/vsphere/vsphere.conf)
|
||||||
|
|
||||||
|
Sample Config:
|
||||||
|
```
|
||||||
|
[Global]
|
||||||
|
user = <User name for vCenter>
|
||||||
|
password = <Password for vCenter>
|
||||||
|
server = <IP/URL for vCenter>
|
||||||
|
port = <Default 443 for vCenter>
|
||||||
|
insecure-flag = <set to 1 if the host above uses a self-signed cert>
|
||||||
|
datacenter = <Datacenter to be used>
|
||||||
|
datastore = <Datastore to use for provisioning volumes using storage classes/dynamic provisioning>
|
||||||
|
working-dir = <Folder in which VMs are provisioned, can be null>
|
||||||
|
[Disk]
|
||||||
|
scsicontrollertype = pvscsi
|
||||||
|
```
|
||||||
|
|
||||||
|
* Set the cloud provider via ```--cloud-provider=vsphere``` flag for each instance of kubelet, apiserver and controller manager.
|
||||||
|
|
||||||
|
|
||||||
|
#### Known issues
|
||||||
|
|
||||||
|
* [Volumes are not removed from a VM configuration if the VM is down](https://github.com/kubernetes/kubernetes/issues/33061). The workaround is to manually remove the disk from VM settings before powering it up.
|
||||||
|
* [FS groups are not supported in 1.4.7](https://github.com/kubernetes/kubernetes/issues/34039)
|
||||||
|
|
||||||
|
### Kube-up (Deprecated)
|
||||||
|
|
||||||
|
Kube-up.sh is no longer supported and is deprecated. The steps for kube-up are included but going forward [kube-anywhere](https://github.com/kubernetes/kubernetes-anywhere) is preferred.
|
||||||
|
|
||||||
|
The recommended version for kube-up is [v1.4.7](https://github.com/kubernetes/kubernetes/releases/tag/v1.4.7)
|
||||||
|
|
||||||
|
The example below creates a Kubernetes cluster with 4 worker node Virtual.
|
||||||
|
Machines and a master Virtual Machine (i.e. 5 VMs in your cluster). This cluster is set up and controlled from your workstation (or wherever you find convenient).
|
||||||
|
|
||||||
|
#### Prerequisites
|
||||||
|
|
||||||
|
* You need administrator credentials to an ESXi machine or vCenter instance with write mode api access enabled (not available on the free ESXi license).
|
||||||
|
* You must have Go (see [here](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/docs/devel/development.md#go-versions) for supported versions) installed: [www.golang.org](http://www.golang.org).
|
||||||
|
* You must have your `GOPATH` set up and include `$GOPATH/bin` in your `PATH`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export GOPATH=$HOME/src/go
|
export GOPATH=$HOME/src/go
|
||||||
@@ -25,7 +101,7 @@ mkdir -p $GOPATH
|
|||||||
export PATH=$PATH:$GOPATH/bin
|
export PATH=$PATH:$GOPATH/bin
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Install the govc tool to interact with ESXi/vCenter. Head to [govc Releases](https://github.com/vmware/govmomi/releases) to download the latest.
|
* Install the govc tool to interact with ESXi/vCenter. Head to [govc Releases](https://github.com/vmware/govmomi/releases) to download the latest.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Sample commands for v0.8.0 for 64 bit Linux.
|
# Sample commands for v0.8.0 for 64 bit Linux.
|
||||||
@@ -35,9 +111,9 @@ chmod +x govc_linux_amd64
|
|||||||
mv govc_linux_amd64 /usr/local/bin/govc
|
mv govc_linux_amd64 /usr/local/bin/govc
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Get or build a [binary release](/docs/getting-started-guides/binary_release)
|
* Get or build a [binary release](/docs/getting-started-guides/binary_release)
|
||||||
|
|
||||||
### Setup
|
#### Setup
|
||||||
|
|
||||||
Download a prebuilt Debian 8.2 VMDK that we'll use as a base image:
|
Download a prebuilt Debian 8.2 VMDK that we'll use as a base image:
|
||||||
|
|
||||||
@@ -100,19 +176,19 @@ make any needed changes. You can configure the number of nodes
|
|||||||
as well as the IP subnets you have made available to Kubernetes, pods,
|
as well as the IP subnets you have made available to Kubernetes, pods,
|
||||||
and services.
|
and services.
|
||||||
|
|
||||||
### Starting a cluster
|
#### Starting a cluster
|
||||||
|
|
||||||
Now, let's continue with deploying Kubernetes.
|
Now, let's continue with deploying Kubernetes.
|
||||||
This process takes about ~20-30 minutes depending on your network.
|
This process takes about ~20-30 minutes depending on your network.
|
||||||
|
|
||||||
#### From extracted binary release
|
##### From extracted binary release
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd kubernetes
|
cd kubernetes
|
||||||
KUBERNETES_PROVIDER=vsphere cluster/kube-up.sh
|
KUBERNETES_PROVIDER=vsphere cluster/kube-up.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Build from source
|
##### Build from source
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd kubernetes
|
cd kubernetes
|
||||||
@@ -126,7 +202,7 @@ deployment works just as any other one!
|
|||||||
|
|
||||||
**Enjoy!**
|
**Enjoy!**
|
||||||
|
|
||||||
### Extra: debugging deployment failure
|
#### Extra: debugging deployment failure
|
||||||
|
|
||||||
The output of `kube-up.sh` displays the IP addresses of the VMs it deploys. You
|
The output of `kube-up.sh` displays the IP addresses of the VMs it deploys. You
|
||||||
can log into any VM as the `kube` user to poke around and figure out what is
|
can log into any VM as the `kube` user to poke around and figure out what is
|
||||||
@@ -138,7 +214,7 @@ going on (find yourself authorized with your SSH key, or use the password
|
|||||||
|
|
||||||
IaaS Provider | Config. Mgmt | OS | Networking | Docs | Conforms | Support Level
|
IaaS Provider | Config. Mgmt | OS | Networking | Docs | Conforms | Support Level
|
||||||
-------------------- | ------------ | ------ | ---------- | --------------------------------------------- | ---------| ----------------------------
|
-------------------- | ------------ | ------ | ---------- | --------------------------------------------- | ---------| ----------------------------
|
||||||
Vmware vSphere | Saltstack | Debian | OVS | [docs](/docs/getting-started-guides/vsphere) | | Community ([@imkin](https://github.com/imkin)), ([@abrarshivani](https://github.com/abrarshivani)), ([@kerneltime](https://github.com/kerneltime)), ([@kerneltime](https://github.com/luomiao))
|
Vmware vSphere | Kube-anywhere | Photon OS | Flannel | [docs](/docs/getting-started-guides/vsphere) | | Community ([@abrarshivani](https://github.com/abrarshivani)), ([@kerneltime](https://github.com/kerneltime)), ([@BaluDontu](https://github.com/BaluDontu))([@luomiao](https://github.com/luomiao))
|
||||||
|
|
||||||
For support level information on all solutions, see the [Table of solutions](/docs/getting-started-guides/#table-of-solutions) chart.
|
For support level information on all solutions, see the [Table of solutions](/docs/getting-started-guides/#table-of-solutions) chart.
|
||||||
|
|
||||||
|
|||||||
@@ -15,18 +15,18 @@ In Kubernetes version 1.5, Windows Server Containers for Kubernetes is supported
|
|||||||
4. Docker Version 1.12.2-cs2-ws-beta or later for Windows Server nodes (Linux nodes and Kubernetes control plane can run any Kubernetes supported Docker Version)
|
4. Docker Version 1.12.2-cs2-ws-beta or later for Windows Server nodes (Linux nodes and Kubernetes control plane can run any Kubernetes supported Docker Version)
|
||||||
|
|
||||||
## Networking
|
## Networking
|
||||||
Network is achieved using L3 routing. Because third-party networking plugins (e.g. flannel, calico, etc) don’t natively work on Windows Server, existing technology that is built into the Windows and Linux operating systems is relied on. In this L3 networking approach, a /16 subnet is chosen for the cluster nodes, and a /24 subnet is assigned to each worker node. All pods on a given worker node will be connected to the /24 subnet. This allows pods on the same node to communicate with each other. In order to enable networking between pods running on different nodes, routing features that are built into Windows Server 2016 and Linux are used.
|
Network is achieved using L3 routing. Because third-party networking plugins (e.g. flannel, calico, etc) don't natively work on Windows Server, existing technology that is built into the Windows and Linux operating systems is relied on. In this L3 networking approach, a /16 subnet is chosen for the cluster nodes, and a /24 subnet is assigned to each worker node. All pods on a given worker node will be connected to the /24 subnet. This allows pods on the same node to communicate with each other. In order to enable networking between pods running on different nodes, routing features that are built into Windows Server 2016 and Linux are used.
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
The above networking approach is already supported on Linux using a bridge interface, which essentially creates a private network local to the node. Similar to the Windows side, routes to all other pod CIDRs must be created in order to send packets via the “public” NIC.
|
The above networking approach is already supported on Linux using a bridge interface, which essentially creates a private network local to the node. Similar to the Windows side, routes to all other pod CIDRs must be created in order to send packets via the "public" NIC.
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
Each Window Server node should have the following configuration:
|
Each Window Server node should have the following configuration:
|
||||||
|
|
||||||
1. Two NICs (virtual networking adapters) are required on each Windows Server node - The two Windows container networking modes of interest (transparent and L2 bridge) use an external Hyper-V virtual switch. This means that one of the NICs is entirely allocated to the bridge, creating the need for the second NIC.
|
1. Two NICs (virtual networking adapters) are required on each Windows Server node - The two Windows container networking modes of interest (transparent and L2 bridge) use an external Hyper-V virtual switch. This means that one of the NICs is entirely allocated to the bridge, creating the need for the second NIC.
|
||||||
2. Transparent container network created - This is a manual configuration step and is shown in **_Route Setup_** section below
|
2. Transparent container network created - This is a manual configuration step and is shown in **_Route Setup_** section below
|
||||||
3. RRAS (Routing) Windows feature enabled - Allows routing between NICs on the box, and also “captures” packets that have the destination IP of a POD running on the node. To enable, open “Server Manager”. Click on “Roles”, “Add Roles”. Click “Next”. Select “Network Policy and Access Services”. Click on “Routing and Remote Access Service” and the underlying checkboxes
|
3. RRAS (Routing) Windows feature enabled - Allows routing between NICs on the box, and also "captures" packets that have the destination IP of a POD running on the node. To enable, open "Server Manager". Click on "Roles", "Add Roles". Click "Next". Select "Network Policy and Access Services". Click on "Routing and Remote Access Service" and the underlying checkboxes
|
||||||
4. Routes defined pointing to the other pod CIDRs via the “public” NIC - These routes are added to the built-in routing table as shown in **_Route Setup_** section below
|
4. Routes defined pointing to the other pod CIDRs via the "public" NIC - These routes are added to the built-in routing table as shown in **_Route Setup_** section below
|
||||||
|
|
||||||
The following diagram illustrates the Windows Server networking setup for Kubernetes Setup
|
The following diagram illustrates the Windows Server networking setup for Kubernetes Setup
|
||||||

|

|
||||||
|
|||||||
+11
-11
@@ -12,7 +12,7 @@ title: Hello World on Google Container Engine
|
|||||||
|
|
||||||
The goal of this codelab is for you to turn a simple Hello World node.js app into a replicated application running on Kubernetes. We will show you how to take code that you have developed on your machine, turn it into a Docker container image, and then run that image on [Google Container Engine](https://cloud.google.com/container-engine/).
|
The goal of this codelab is for you to turn a simple Hello World node.js app into a replicated application running on Kubernetes. We will show you how to take code that you have developed on your machine, turn it into a Docker container image, and then run that image on [Google Container Engine](https://cloud.google.com/container-engine/).
|
||||||
|
|
||||||
Here’s a diagram of the various parts in play in this codelab to help you understand how pieces fit with one another. Use this as a reference as we progress through the codelab; it should all make sense by the time we get to the end.
|
Here's a diagram of the various parts in play in this codelab to help you understand how pieces fit with one another. Use this as a reference as we progress through the codelab; it should all make sense by the time we get to the end.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ export PROJECT_ID="your-project-id"
|
|||||||
|
|
||||||
Next, [enable billing](https://console.cloud.google.com/billing) in the Cloud Console in order to use Google Cloud resources and [enable the Container Engine API](https://console.cloud.google.com/project/_/kubernetes/list).
|
Next, [enable billing](https://console.cloud.google.com/billing) in the Cloud Console in order to use Google Cloud resources and [enable the Container Engine API](https://console.cloud.google.com/project/_/kubernetes/list).
|
||||||
|
|
||||||
New users of Google Cloud Platform receive a [$300 free trial](https://console.cloud.google.com/billing/freetrial?hl=en). Running through this codelab shouldn’t cost you more than a few dollars of that trial. Google Container Engine pricing is documented [here](https://cloud.google.com/container-engine/pricing).
|
New users of Google Cloud Platform receive a [$300 free trial](https://console.cloud.google.com/billing/freetrial?hl=en). Running through this codelab shouldn't cost you more than a few dollars of that trial. Google Container Engine pricing is documented [here](https://cloud.google.com/container-engine/pricing).
|
||||||
|
|
||||||
Next, make sure you [download Node.js](https://nodejs.org/en/download/). You can skip this and the steps for installing Docker and Cloud SDK if you're using Cloud Shell.
|
Next, make sure you [download Node.js](https://nodejs.org/en/download/). You can skip this and the steps for installing Docker and Cloud SDK if you're using Cloud Shell.
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ You should be able to see your "Hello World!" message at http://localhost:8080/.
|
|||||||
|
|
||||||
Stop the running node server by pressing Ctrl-C.
|
Stop the running node server by pressing Ctrl-C.
|
||||||
|
|
||||||
Now let’s package this application in a Docker container.
|
Now let's package this application in a Docker container.
|
||||||
|
|
||||||
## Create a Docker container image
|
## Create a Docker container image
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ Let's try your image out with Docker:
|
|||||||
docker run -d -p 8080:8080 --name hello_tutorial gcr.io/$PROJECT_ID/hello-node:v1
|
docker run -d -p 8080:8080 --name hello_tutorial gcr.io/$PROJECT_ID/hello-node:v1
|
||||||
```
|
```
|
||||||
|
|
||||||
Visit your app in the browser, or use `curl` or `wget` if you’d like :
|
Visit your app in the browser, or use `curl` or `wget` if you'd like :
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl http://localhost:8080
|
curl http://localhost:8080
|
||||||
@@ -123,7 +123,7 @@ You should see `Hello World!`
|
|||||||
curl "http://$(docker-machine ip YOUR-VM-MACHINE-NAME):8080"
|
curl "http://$(docker-machine ip YOUR-VM-MACHINE-NAME):8080"
|
||||||
```
|
```
|
||||||
|
|
||||||
Let’s now stop the container. You can list the docker containers with:
|
Let's now stop the container. You can list the docker containers with:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker ps
|
docker ps
|
||||||
@@ -180,7 +180,7 @@ You should get a Kubernetes cluster with three nodes, ready to receive your cont
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
It’s now time to deploy your own containerized application to the Kubernetes cluster!
|
It's now time to deploy your own containerized application to the Kubernetes cluster!
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
gcloud container clusters get-credentials hello-world
|
gcloud container clusters get-credentials hello-world
|
||||||
@@ -258,7 +258,7 @@ kubectl expose deployment hello-node --type="LoadBalancer"
|
|||||||
|
|
||||||
**If this fails, make sure your client and server are both version 1.3. See the [Create your cluster](#create-your-cluster) section for details.**
|
**If this fails, make sure your client and server are both version 1.3. See the [Create your cluster](#create-your-cluster) section for details.**
|
||||||
|
|
||||||
The flag used in this command specifies that we’ll be using the load-balancer provided by the underlying infrastructure (in this case the [Compute Engine load balancer](https://cloud.google.com/compute/docs/load-balancing/)). Note that we expose the deployment, and not the pod directly. This will cause the resulting service to load balance traffic across all pods managed by the deployment (in this case only 1 pod, but we will add more replicas later).
|
The flag used in this command specifies that we'll be using the load-balancer provided by the underlying infrastructure (in this case the [Compute Engine load balancer](https://cloud.google.com/compute/docs/load-balancing/)). Note that we expose the deployment, and not the pod directly. This will cause the resulting service to load balance traffic across all pods managed by the deployment (in this case only 1 pod, but we will add more replicas later).
|
||||||
|
|
||||||
The Kubernetes master creates the load balancer and related Compute Engine forwarding rules, target pools, and firewall rules to make the service fully accessible from outside of Google Cloud Platform.
|
The Kubernetes master creates the load balancer and related Compute Engine forwarding rules, target pools, and firewall rules to make the service fully accessible from outside of Google Cloud Platform.
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ hello-node-714049816-ztzrb 1/1 Running 0 41m
|
|||||||
|
|
||||||
Note the **declarative approach** here - rather than starting or stopping new instances you declare how many instances you want to be running. Kubernetes reconciliation loops simply make sure the reality matches what you requested and take action if needed.
|
Note the **declarative approach** here - rather than starting or stopping new instances you declare how many instances you want to be running. Kubernetes reconciliation loops simply make sure the reality matches what you requested and take action if needed.
|
||||||
|
|
||||||
Here’s a diagram summarizing the state of our Kubernetes cluster:
|
Here's a diagram summarizing the state of our Kubernetes cluster:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ Here’s a diagram summarizing the state of our Kubernetes cluster:
|
|||||||
|
|
||||||
As always, the application you deployed to production requires bug fixes or additional features. Kubernetes is here to help you deploy a new version to production without impacting your users.
|
As always, the application you deployed to production requires bug fixes or additional features. Kubernetes is here to help you deploy a new version to production without impacting your users.
|
||||||
|
|
||||||
First, let’s modify the application. On the development machine, edit server.js and update the response message:
|
First, let's modify the application. On the development machine, edit server.js and update the response message:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
response.end('Hello Kubernetes World!');
|
response.end('Hello Kubernetes World!');
|
||||||
@@ -345,7 +345,7 @@ gcloud docker -- push gcr.io/$PROJECT_ID/hello-node:v2
|
|||||||
|
|
||||||
Building and pushing this updated image should be much quicker as we take full advantage of the Docker cache.
|
Building and pushing this updated image should be much quicker as we take full advantage of the Docker cache.
|
||||||
|
|
||||||
We’re now ready for Kubernetes to smoothly update our deployment to the new version of the application. In order to change
|
We're now ready for Kubernetes to smoothly update our deployment to the new version of the application. In order to change
|
||||||
the image label for our running container, we will need to edit the existing *hello-node deployment* and change the image from
|
the image label for our running container, we will need to edit the existing *hello-node deployment* and change the image from
|
||||||
`gcr.io/$PROJECT_ID/hello-node:v1` to `gcr.io/$PROJECT_ID/hello-node:v2`. To do this, we will use the `kubectl set image` command.
|
`gcr.io/$PROJECT_ID/hello-node:v1` to `gcr.io/$PROJECT_ID/hello-node:v2`. To do this, we will use the `kubectl set image` command.
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@ hello-node 4 5 4 3 1h
|
|||||||
|
|
||||||
While this is happening, the users of the services should not see any interruption. After a little while they will start accessing the new version of your application. You can find more details in the [deployment documentation](/docs/user-guide/deployments/).
|
While this is happening, the users of the services should not see any interruption. After a little while they will start accessing the new version of your application. You can find more details in the [deployment documentation](/docs/user-guide/deployments/).
|
||||||
|
|
||||||
Hopefully with these deployment, scaling and update features you’ll agree that once you’ve setup your environment (your GKE/Kubernetes cluster here), Kubernetes is here to help you focus on the application rather than the infrastructure.
|
Hopefully with these deployment, scaling and update features you'll agree that once you've setup your environment (your GKE/Kubernetes cluster here), Kubernetes is here to help you focus on the application rather than the infrastructure.
|
||||||
|
|
||||||
## Observe the Kubernetes Web UI (optional)
|
## Observe the Kubernetes Web UI (optional)
|
||||||
|
|
||||||
|
|||||||
@@ -5,24 +5,4 @@ assignees:
|
|||||||
title: Report a Security Vulnerability
|
title: Report a Security Vulnerability
|
||||||
---
|
---
|
||||||
|
|
||||||
If you believe you have discovered a vulnerability or a have a security incident to report, please follow the steps below. This applies to Kubernetes releases v1.0 or later.
|
This document has moved to [http://kubernetes.io/security](http://kubernetes.io/security).
|
||||||
|
|
||||||
To watch for security and major API announcements, please join our [kubernetes-announce](https://groups.google.com/forum/#!forum/kubernetes-announce) group.
|
|
||||||
|
|
||||||
## Reporting a security issue
|
|
||||||
|
|
||||||
To report an issue, please:
|
|
||||||
|
|
||||||
- Submit a bug report [here](http://goo.gl/vulnz).
|
|
||||||
- Select 'I want to report a technical security bug in a Google product (SQLi, XSS, etc.).'?
|
|
||||||
- Select 'Other'? as the Application Type.
|
|
||||||
- Under reproduction steps, please additionally include
|
|
||||||
- the words "Kubernetes Security issue"
|
|
||||||
- Description of the issue
|
|
||||||
- Kubernetes release (e.g. output of `kubectl version` command, which includes server version.)
|
|
||||||
- Environment setup (e.g. which "Getting Started Guide" you followed, if any; what node operating system used; what service or software creates your virtual machines, if any)
|
|
||||||
|
|
||||||
An online submission will have the fastest response; however, if you prefer email, please send mail to security@google.com. If you feel the need, please use the [PGP public key](https://services.google.com/corporate/publickey.txt) to encrypt communications.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ load-balanced access to an application running in a cluster.
|
|||||||
NAME DESIRED CURRENT AGE
|
NAME DESIRED CURRENT AGE
|
||||||
hello-world-2189936611 2 2 12m
|
hello-world-2189936611 2 2 12m
|
||||||
|
|
||||||
1. Create a Serivice object that exposes the replica set:
|
1. Create a Service object that exposes the replica set:
|
||||||
|
|
||||||
kubectl expose rs <your-replica-set-name> --type="LoadBalancer" --name="example-service"
|
kubectl expose rs <your-replica-set-name> --type="LoadBalancer" --name="example-service"
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,13 @@ down its physical machine or, if running on a cloud platform, deleting its
|
|||||||
virtual machine.
|
virtual machine.
|
||||||
|
|
||||||
First, identify the name of the node you wish to drain. You can list all of the nodes in your cluster with
|
First, identify the name of the node you wish to drain. You can list all of the nodes in your cluster with
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, tell Kubernetes to drain the node:
|
Next, tell Kubernetes to drain the node:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl drain <node name>
|
kubectl drain <node name>
|
||||||
```
|
```
|
||||||
@@ -56,6 +58,7 @@ kubectl drain <node name>
|
|||||||
Once it returns (without giving an error), you can power down the node
|
Once it returns (without giving an error), you can power down the node
|
||||||
(or equivalently, if on a cloud platform, delete the virtual machine backing the node).
|
(or equivalently, if on a cloud platform, delete the virtual machine backing the node).
|
||||||
If you leave the node in the cluster during the maintenance operation, you need to run
|
If you leave the node in the cluster during the maintenance operation, you need to run
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl uncordon <node name>
|
kubectl uncordon <node name>
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ This task shows you how to delete a StatefulSet.
|
|||||||
|
|
||||||
### Deleting a StatefulSet
|
### Deleting a StatefulSet
|
||||||
|
|
||||||
You can delete a StatefulSet in the same way you delete other resources in kubernetes: use the `kubectl delete` command, and specify the StatefulSet either by file or by name.
|
You can delete a StatefulSet in the same way you delete other resources in Kubernetes: use the `kubectl delete` command, and specify the StatefulSet either by file or by name.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl delete -f <file.yaml>
|
kubectl delete -f <file.yaml>
|
||||||
|
|||||||
+12
-10
@@ -4,29 +4,31 @@ assignees:
|
|||||||
title: Tools
|
title: Tools
|
||||||
---
|
---
|
||||||
|
|
||||||
* TOC
|
Kubernetes contains several built-in tools to help you work with the Kubernetes system, and also supports third-party tooling.
|
||||||
{:toc}
|
|
||||||
|
|
||||||
## Native Tools
|
#### Native Tools
|
||||||
|
|
||||||
### Kubectl
|
Kubernetes contains the following built-in tools:
|
||||||
|
|
||||||
|
##### Kubectl
|
||||||
|
|
||||||
[`kubectl`](/docs/user-guide/kubectl/) is the command line tool for Kubernetes. It controls the Kubernetes cluster manager.
|
[`kubectl`](/docs/user-guide/kubectl/) is the command line tool for Kubernetes. It controls the Kubernetes cluster manager.
|
||||||
|
|
||||||
### Kubefed
|
##### Kubefed
|
||||||
|
|
||||||
[`kubefed`](/docs/admin/federation/kubefed/) is the command line tool
|
[`kubefed`](/docs/admin/federation/kubefed/) is the command line tool
|
||||||
to help you administrate your federated clusters.
|
to help you administrate your federated clusters.
|
||||||
|
|
||||||
|
##### Dashboard
|
||||||
### Dashboard
|
|
||||||
|
|
||||||
[Dashboard](/docs/user-guide/ui/), the web-based user interface of Kubernetes, allows you to deploy containerized applications
|
[Dashboard](/docs/user-guide/ui/), the web-based user interface of Kubernetes, allows you to deploy containerized applications
|
||||||
to a Kubernetes cluster, troubleshoot them, and manage the cluster and its resources itself.
|
to a Kubernetes cluster, troubleshoot them, and manage the cluster and its resources itself.
|
||||||
|
|
||||||
## Third-Party Tools
|
#### Third-Party Tools
|
||||||
|
|
||||||
### Helm
|
Kubernetes supports various third-party tools. These include, but are not limited to:
|
||||||
|
|
||||||
|
##### Helm
|
||||||
|
|
||||||
[Kubernetes Helm](https://github.com/kubernetes/helm) is a tool for managing packages of pre-configured
|
[Kubernetes Helm](https://github.com/kubernetes/helm) is a tool for managing packages of pre-configured
|
||||||
Kubernetes resources, aka Kubernetes charts.
|
Kubernetes resources, aka Kubernetes charts.
|
||||||
@@ -39,7 +41,7 @@ Use Helm to:
|
|||||||
* Intelligently manage your Kubernetes manifest files
|
* Intelligently manage your Kubernetes manifest files
|
||||||
* Manage releases of Helm packages
|
* Manage releases of Helm packages
|
||||||
|
|
||||||
### Kompose
|
##### Kompose
|
||||||
|
|
||||||
[Kompose](https://github.com/kubernetes-incubator/kompose) is a tool to help users familiar with Docker Compose
|
[Kompose](https://github.com/kubernetes-incubator/kompose) is a tool to help users familiar with Docker Compose
|
||||||
move to Kubernetes.
|
move to Kubernetes.
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ You may also find the Stack Overflow topics relevant:
|
|||||||
|
|
||||||
Someone else from the community may have already asked a similar question or may
|
Someone else from the community may have already asked a similar question or may
|
||||||
be able to help with your problem. The Kubernetes team will also monitor
|
be able to help with your problem. The Kubernetes team will also monitor
|
||||||
[posts tagged kubernetes](http://stackoverflow.com/questions/tagged/kubernetes).
|
[posts tagged Kubernetes](http://stackoverflow.com/questions/tagged/kubernetes).
|
||||||
If there aren't any existing questions that help, please [ask a new one](http://stackoverflow.com/questions/ask?tags=kubernetes)!
|
If there aren't any existing questions that help, please [ask a new one](http://stackoverflow.com/questions/ask?tags=kubernetes)!
|
||||||
|
|
||||||
### Slack
|
### Slack
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ title: Using Minikube to Create a Cluster
|
|||||||
|
|
||||||
<p>A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use <a href="https://github.com/kubernetes/minikube">Minikube</a>. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, Mac OS and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this bootcamp, however, you'll use a provided online terminal with Minikube pre-installed.</p>
|
<p>A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use <a href="https://github.com/kubernetes/minikube">Minikube</a>. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, Mac OS and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this bootcamp, however, you'll use a provided online terminal with Minikube pre-installed.</p>
|
||||||
|
|
||||||
<p>Now that you know what Kubernetes is, let’s go to the online tutorial and start our first cluster!</p>
|
<p>Now that you know what Kubernetes is, let's go to the online tutorial and start our first cluster!</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ title: Using kubectl to Create a Deployment
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<p>For our first Deployment, we’ll use a <a href="https://nodejs.org">Node.js</a> application packaged in a Docker container. The source code and the Dockerfile are available in the <a href="https://github.com/kubernetes/kubernetes-bootcamp">GitHub repository</a> for the Kubernetes Bootcamp.</p>
|
<p>For our first Deployment, we'll use a <a href="https://nodejs.org">Node.js</a> application packaged in a Docker container. The source code and the Dockerfile are available in the <a href="https://github.com/kubernetes/kubernetes-bootcamp">GitHub repository</a> for the Kubernetes Bootcamp.</p>
|
||||||
|
|
||||||
<p>Now that you know what Deployments are, let’s go to the online tutorial and deploy our first app!</p>
|
<p>Now that you know what Deployments are, let's go to the online tutorial and deploy our first app!</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ title: Viewing Pods and Nodes
|
|||||||
<li>Networking, as a unique cluster IP address</li>
|
<li>Networking, as a unique cluster IP address</li>
|
||||||
<li>Information about how to run each container, such as the container image version or specific ports to use</li>
|
<li>Information about how to run each container, such as the container image version or specific ports to use</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>A Pod models an application-specific “logical host” and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your Node.js app as well as a different container that feeds the data to be published by the Node.js webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node.</p>
|
<p>A Pod models an application-specific "logical host" and can contain different application containers which are relatively tightly coupled. For example, a Pod might include both the container with your Node.js app as well as a different container that feeds the data to be published by the Node.js webserver. The containers in a Pod share an IP Address and port space, are always co-located and co-scheduled, and run in a shared context on the same Node.</p>
|
||||||
|
|
||||||
<p>Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.</p>
|
<p>Pods are the atomic unit on the Kubernetes platform. When we create a Deployment on Kubernetes, that Deployment creates Pods with containers inside them (as opposed to creating containers directly). Each Pod is tied to the Node where it is scheduled, and remains there until termination (according to restart policy) or deletion. In case of a Node failure, identical Pods are scheduled on other available Nodes in the cluster.</p>
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ title: Viewing Pods and Nodes
|
|||||||
|
|
||||||
<p>You can use these commands to see when applications were deployed, what their current statuses are, where they are running and what their configurations are.</p>
|
<p>You can use these commands to see when applications were deployed, what their current statuses are, where they are running and what their configurations are.</p>
|
||||||
|
|
||||||
<p>Now that we know more about our cluster components and the command line, let’s explore our application.</p>
|
<p>Now that we know more about our cluster components and the command line, let's explore our application.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ title: Using a Service to Expose Your App
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<h3>Kubernetes Services</h3>
|
<h3>Kubernetes Services</h3>
|
||||||
|
|
||||||
<p>While Pods do have their own unique IP across the cluster, those IP’s are not exposed outside Kubernetes. Taking into account that over time Pods may be terminated, deleted or replaced by other Pods, we need a way to let other Pods and applications automatically discover each other. Kubernetes addresses this by grouping Pods in Services. A Kubernetes <b>Service</b> is an abstraction layer which defines a logical set of Pods and enables external traffic exposure, load balancing and service discovery for those Pods.</p>
|
<p>While Pods do have their own unique IP across the cluster, those IP's are not exposed outside Kubernetes. Taking into account that over time Pods may be terminated, deleted or replaced by other Pods, we need a way to let other Pods and applications automatically discover each other. Kubernetes addresses this by grouping Pods in Services. A Kubernetes <b>Service</b> is an abstraction layer which defines a logical set of Pods and enables external traffic exposure, load balancing and service discovery for those Pods.</p>
|
||||||
|
|
||||||
<p>This abstraction will allow us to expose Pods to traffic originating from outside the cluster. Services have their own unique cluster-private IP address and expose a port to receive traffic. If you choose to expose the service outside the cluster, the options are:</p>
|
<p>This abstraction will allow us to expose Pods to traffic originating from outside the cluster. Services have their own unique cluster-private IP address and expose a port to receive traffic. If you choose to expose the service outside the cluster, the options are:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>LoadBalancer - provides a public IP address (what you would typically use when you run Kubernetes on GKE or AWS)</li>
|
<li>LoadBalancer - provides a public IP address (what you would typically use when you run Kubernetes on GCP or AWS)</li>
|
||||||
<li>NodePort - exposes the Service on the same port on each Node of the cluster using NAT (available on all Kubernetes clusters, and in Minikube)</li>
|
<li>NodePort - exposes the Service on the same port on each Node of the cluster using NAT (available on all Kubernetes clusters, and in Minikube)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +70,7 @@ title: Using a Service to Expose Your App
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
<p>A Service provides load balancing of traffic across the contained set of Pods. This is useful when a service is created to group all Pods from a specific Deployment (our application will make use of this in the next module, when we’ll have multiple instances running).</p>
|
<p>A Service provides load balancing of traffic across the contained set of Pods. This is useful when a service is created to group all Pods from a specific Deployment (our application will make use of this in the next module, when we'll have multiple instances running).</p>
|
||||||
|
|
||||||
<p>Services are also responsible for service-discovery within the cluster (covered in <a href="/docs/user-guide/connecting-applications/#accessing-the-service">Accessing the Service</a>). This will for example allow a frontend service (like a web server) to receive traffic from a backend service (like a database) without worrying about Pods.</p>
|
<p>Services are also responsible for service-discovery within the cluster (covered in <a href="/docs/user-guide/connecting-applications/#accessing-the-service">Accessing the Service</a>). This will for example allow a frontend service (like a web server) to receive traffic from a backend service (like a database) without worrying about Pods.</p>
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ title: Using a Service to Expose Your App
|
|||||||
<p>Labels can be attached to objects at the creation time or later and can be modified at any time.
|
<p>Labels can be attached to objects at the creation time or later and can be modified at any time.
|
||||||
The kubectl run command sets some default Labels/Label Selectors on the new Pods/ Deployment. The link between Labels and Label Selectors defines the relationship between the Deployment and the Pods it creates.</p>
|
The kubectl run command sets some default Labels/Label Selectors on the new Pods/ Deployment. The link between Labels and Label Selectors defines the relationship between the Deployment and the Pods it creates.</p>
|
||||||
|
|
||||||
<p>Now let’s expose our application with the help of a Service, and apply some new Labels.</p>
|
<p>Now let's expose our application with the help of a Service, and apply some new Labels.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ title: Running Multiple Instances of Your App
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<p> Once you have multiple instances of an Application running, you would be able to do Rolling updates without downtime. We’ll cover that in the next module. Now, let’s go to the online terminal and scale our application.</p>
|
<p> Once you have multiple instances of an Application running, you would be able to do Rolling updates without downtime. We'll cover that in the next module. Now, let's go to the online terminal and scale our application.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ title: Performing a Rolling Update
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<p> In the following interactive tutorial we’ll update our application to a new version, and also perform a rollback.</p>
|
<p> In the following interactive tutorial we'll update our application to a new version, and also perform a rollback.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ This document makes use of the following terms:
|
|||||||
|
|
||||||
You must have a working Kubernetes 1.5 cluster to run the examples in this
|
You must have a working Kubernetes 1.5 cluster to run the examples in this
|
||||||
document. The examples use a small nginx webserver that echoes back the source
|
document. The examples use a small nginx webserver that echoes back the source
|
||||||
IP of requests it receives through a HTTP header. You can create it as follows:
|
IP of requests it receives through an HTTP header. You can create it as follows:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ kubectl run source-ip-app --image=gcr.io/google_containers/echoserver:1.4
|
$ kubectl run source-ip-app --image=gcr.io/google_containers/echoserver:1.4
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ title: StatefulSet Basics
|
|||||||
---
|
---
|
||||||
|
|
||||||
{% capture overview %}
|
{% capture overview %}
|
||||||
This tutorial provides an introduction to managing applications with
|
This tutorial provides an introduction to manage applications with
|
||||||
[StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/). It
|
[StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/). It
|
||||||
demonstrates how to create, delete, scale, and update the container image of a
|
demonstrates how to create, delete, scale, and update the container image of a
|
||||||
StatefulSet.
|
StatefulSet.
|
||||||
@@ -77,7 +77,7 @@ In the second terminal, use
|
|||||||
Headless Service and StatefulSet defined in `web.yaml`.
|
Headless Service and StatefulSet defined in `web.yaml`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl create -f web.yml
|
kubectl create -f web.yaml
|
||||||
service "nginx" created
|
service "nginx" created
|
||||||
statefulset "web" created
|
statefulset "web" created
|
||||||
```
|
```
|
||||||
@@ -122,7 +122,7 @@ launching `web-1`. In fact, `web-1` is not launched until `web-0` is
|
|||||||
[Running and Ready](/docs/user-guide/pod-states).
|
[Running and Ready](/docs/user-guide/pod-states).
|
||||||
|
|
||||||
### Pods in a StatefulSet
|
### Pods in a StatefulSet
|
||||||
Unlike Pods in other controllers, the Pods in a StatefulSet have a unqiue
|
Unlike Pods in other controllers, the Pods in a StatefulSet have a unique
|
||||||
ordinal index and a stable network identity.
|
ordinal index and a stable network identity.
|
||||||
|
|
||||||
#### Examining the Pod's Ordinal Index
|
#### Examining the Pod's Ordinal Index
|
||||||
@@ -177,7 +177,7 @@ Name: web-1.nginx
|
|||||||
Address 1: 10.244.2.6
|
Address 1: 10.244.2.6
|
||||||
```
|
```
|
||||||
|
|
||||||
The CNAME of the headless serivce points to SRV records (one for each Pod that
|
The CNAME of the headless service points to SRV records (one for each Pod that
|
||||||
is Running and Ready). The SRV records point to A record entries that
|
is Running and Ready). The SRV records point to A record entries that
|
||||||
contain the Pods' IP addresses.
|
contain the Pods' IP addresses.
|
||||||
|
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ replicating.
|
|||||||
In general, when a new Pod joins the set as a slave, it must assume the MySQL
|
In general, when a new Pod joins the set as a slave, it must assume the MySQL
|
||||||
master might already have data on it. It also must assume that the replication
|
master might already have data on it. It also must assume that the replication
|
||||||
logs might not go all the way back to the beginning of time.
|
logs might not go all the way back to the beginning of time.
|
||||||
These conservative assumptions are the key to allowing a running StatefulSet
|
These conservative assumptions are the key to allow a running StatefulSet
|
||||||
to scale up and down over time, rather than being fixed at its initial size.
|
to scale up and down over time, rather than being fixed at its initial size.
|
||||||
|
|
||||||
The second Init Container, named `clone-mysql`, performs a clone operation on
|
The second Init Container, named `clone-mysql`, performs a clone operation on
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ zk-2
|
|||||||
```
|
```
|
||||||
|
|
||||||
The servers in a ZooKeeper ensemble use natural numbers as unique identifiers, and
|
The servers in a ZooKeeper ensemble use natural numbers as unique identifiers, and
|
||||||
each server's identifier is stored in a file called `myid` in the server’s
|
each server's identifier is stored in a file called `myid` in the server's
|
||||||
data directory.
|
data directory.
|
||||||
|
|
||||||
Examine the contents of the `myid` file for each server.
|
Examine the contents of the `myid` file for each server.
|
||||||
@@ -799,7 +799,7 @@ Examine the process tree for the ZooKeeper server running in the `zk-0` Pod.
|
|||||||
kubectl exec zk-0 -- ps -ef
|
kubectl exec zk-0 -- ps -ef
|
||||||
```
|
```
|
||||||
|
|
||||||
The command used as the container's entry point has PID 1, and the
|
The command used as the container's entry point has PID 1, and
|
||||||
the ZooKeeper process, a child of the entry point, has PID 23.
|
the ZooKeeper process, a child of the entry point, has PID 23.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
FROM node:6.9.2
|
||||||
|
EXPOSE 8080
|
||||||
|
COPY server.js .
|
||||||
|
CMD node server.js
|
||||||
@@ -4,7 +4,7 @@ title: Exposing an External IP Address to Access an Application in a Cluster
|
|||||||
|
|
||||||
{% capture overview %}
|
{% capture overview %}
|
||||||
|
|
||||||
This page shows how to create a Kubernetes Service object that exposees an
|
This page shows how to create a Kubernetes Service object that exposes an
|
||||||
external IP address.
|
external IP address.
|
||||||
|
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|||||||
@@ -0,0 +1,305 @@
|
|||||||
|
{% capture overview %}
|
||||||
|
|
||||||
|
The goal of this tutorial is for you to turn a simple Hello World Node.js app
|
||||||
|
into an application running on Kubernetes. The tutorial shows you how to
|
||||||
|
take code that you have developed on your machine, turn it into a Docker
|
||||||
|
container image and then run that image on [Minikube](/docs/getting-started-guides/minikube).
|
||||||
|
Minikube provides a simple way of running Kubernetes on your local machine for free.
|
||||||
|
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% capture objectives %}
|
||||||
|
|
||||||
|
* Run a hello world Node.js application.
|
||||||
|
* Deploy the application to Minikube.
|
||||||
|
* View application logs.
|
||||||
|
* Update the application image.
|
||||||
|
|
||||||
|
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% capture prerequisites %}
|
||||||
|
|
||||||
|
* For OS X, you need [Homebrew](https://brew.sh) to install the `xhyve`
|
||||||
|
driver.
|
||||||
|
|
||||||
|
* [NodeJS](https://nodejs.org/en/) is required to run the sample application.
|
||||||
|
|
||||||
|
* Install Docker. On OS X, we recommend
|
||||||
|
[Docker for Mac](https://docs.docker.com/engine/installation/mac/).
|
||||||
|
|
||||||
|
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% capture lessoncontent %}
|
||||||
|
|
||||||
|
### Create a Minikube cluster
|
||||||
|
|
||||||
|
This tutorial uses [Minikube](https://github.com/kubernetes/minikube) to
|
||||||
|
create a local cluster. This tutorial also assumes you are using
|
||||||
|
[Docker for Mac](https://docs.docker.com/engine/installation/mac/)
|
||||||
|
on OS X. If you are on a different platform like Linux, or using VirtualBox
|
||||||
|
instead of Docker for Mac, the instructions to install Minikube may be
|
||||||
|
slightly different. For general Minikube installation instructions, see
|
||||||
|
the [Minikube installation guide](docs/getting-started-guides/minikube/).
|
||||||
|
|
||||||
|
Use `curl` to download and install the latest Minikube release:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
|
||||||
|
```
|
||||||
|
|
||||||
|
Use Homebrew to install the xhyve driver and set its permissions:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
brew install docker-machine-driver-xhyve
|
||||||
|
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
|
||||||
|
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
|
||||||
|
```
|
||||||
|
|
||||||
|
Download the latest version of the `kubectl` command-line tool, which you can
|
||||||
|
use to interact with Kubernetes clusters:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl
|
||||||
|
chmod +x ./kubectl
|
||||||
|
sudo mv ./kubectl /usr/local/bin/kubectl
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the Minikube cluster:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
minikube start --vm-driver=xhyve
|
||||||
|
```
|
||||||
|
|
||||||
|
The `--vm-driver=xyhve` flag specifies that you are using Docker for Mac. The
|
||||||
|
default VM driver is VirtualBox.
|
||||||
|
|
||||||
|
Now set the Minikube context. The context is what determines which cluster
|
||||||
|
`kubectl` is interacting with. You can see all your available contexts in the
|
||||||
|
`~/.kube/config` file.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl config use-context minikube
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify that `kubectl` is configured to communicate with your cluster:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl cluster-info
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create your Node.js application
|
||||||
|
|
||||||
|
The next step is to write the application. Save this code in a folder named `hellonode`
|
||||||
|
with the filename `server.js`:
|
||||||
|
|
||||||
|
{% include code.html language="js" file="server.js" ghlink="docs/tutorials/stateless-application/server.js" %}
|
||||||
|
|
||||||
|
Run your application:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
node server.js
|
||||||
|
```
|
||||||
|
|
||||||
|
You should be able to see your "Hello World!" message at http://localhost:8080/.
|
||||||
|
|
||||||
|
Stop the running Node.js server by pressing **Ctrl-C**.
|
||||||
|
|
||||||
|
The next step is to package your application in a Docker container.
|
||||||
|
|
||||||
|
### Create a Docker container image
|
||||||
|
|
||||||
|
Create a file, also in the `hellonode` folder, named `Dockerfile`. A Dockerfile describes
|
||||||
|
the image that you want to build. You can build a Docker container image by extending an
|
||||||
|
existing image. The image in this tutorial extends an existing Node.js image.
|
||||||
|
|
||||||
|
{% include code.html language="conf" file="Dockerfile" ghlink="/docs/tutorials/stateless-application/Dockerfile" %}
|
||||||
|
|
||||||
|
This recipe for the Docker image starts from the official Node.js LTS image
|
||||||
|
found in the Docker registry, exposes port 8080, copies your `server.js` file
|
||||||
|
to the image and start the Node.js server.
|
||||||
|
|
||||||
|
Because this tutorial uses Minikube, instead of pushing your Docker image to a
|
||||||
|
registry, you can simply build the image using the same Docker host as
|
||||||
|
the Minikube VM, so that the images are automatically present. To do so, make
|
||||||
|
sure you are using the Minikube Docker daemon:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
eval $(minikube docker-env)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** Later, when you no longer wish to use the Minikube host, you can undo
|
||||||
|
this change by running `eval $(minikube docker-env) -u`.
|
||||||
|
|
||||||
|
Build your Docker image, using the Minikube Docker daemon:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build -t hello-node:v1 .
|
||||||
|
```
|
||||||
|
|
||||||
|
Now the Minikube VM can run the image you built.
|
||||||
|
|
||||||
|
### Create a Deployment
|
||||||
|
|
||||||
|
A Kubernetes [*Pod*](/docs/user-guide/pods/) is a group of one or more Containers,
|
||||||
|
tied together for the purposes of administration and networking. The Pod in this
|
||||||
|
tutorial has only one Container. A Kubernetes
|
||||||
|
[*Deployment*](/docs/user-guide/deployments) checks on the health of your
|
||||||
|
Pod and restarts the Pod's Container if it terminates. Deployments are the
|
||||||
|
recommended way to manage the creation and scaling of Pods.
|
||||||
|
|
||||||
|
Use the `kubectl run` command to create a Deployment that manages a Pod. The
|
||||||
|
Pod runs a Container based on your `hello-node:v1` Docker image:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl run hello-node --image=hello-node:v1 --port=8080
|
||||||
|
```
|
||||||
|
|
||||||
|
View the Deployment:
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl get deployments
|
||||||
|
```
|
||||||
|
|
||||||
|
Output:
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
|
||||||
|
hello-node 1 1 1 1 3m
|
||||||
|
```
|
||||||
|
|
||||||
|
View the Pod:
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl get pods
|
||||||
|
```
|
||||||
|
|
||||||
|
Output:
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
NAME READY STATUS RESTARTS AGE
|
||||||
|
hello-node-714049816-ztzrb 1/1 Running 0 6m
|
||||||
|
```
|
||||||
|
|
||||||
|
View cluster events:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl get events
|
||||||
|
```
|
||||||
|
|
||||||
|
View the `kubectl` configuration:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl config view
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information about `kubectl`commands, see the
|
||||||
|
[kubectl overview](/docs/user-guide/kubectl-overview/).
|
||||||
|
|
||||||
|
### Create a Service
|
||||||
|
|
||||||
|
By default, the Pod is only accessible by its internal IP address within the
|
||||||
|
Kubernetes cluster. To make the `hello-node` Container accessible from outside the
|
||||||
|
Kubernetes virtual network, you have to expose the Pod as a
|
||||||
|
Kubernetes [*Service*](/docs/user-guide/services/).
|
||||||
|
|
||||||
|
From your development machine, you can expose the Pod to the public internet
|
||||||
|
using the `kubectl expose` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl expose deployment hello-node --type=LoadBalancer
|
||||||
|
```
|
||||||
|
|
||||||
|
View the Service you just created:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl get services
|
||||||
|
```
|
||||||
|
|
||||||
|
Output:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||||
|
hello-node 10.0.0.71 <pending> 8080/TCP 6m
|
||||||
|
kubernetes 10.0.0.1 <none> 443/TCP 14d
|
||||||
|
```
|
||||||
|
|
||||||
|
The `--type=LoadBalancer` flag indicates that you want to expose your Service
|
||||||
|
outside of the cluster. On cloud providers that support load balancers,
|
||||||
|
an external IP address would be provisioned to access the Service. On Minikube,
|
||||||
|
the `LoadBalancer` type makes the Service accessible through the `minikube service`
|
||||||
|
command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
minikube service hello-node
|
||||||
|
```
|
||||||
|
|
||||||
|
This automatically opens up a browser window using a local IP address that
|
||||||
|
serves your app and shows the "Hello World" message.
|
||||||
|
|
||||||
|
Assuming you've sent requests to your new web service using the browser or curl,
|
||||||
|
you should now be able to see some logs:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl logs <POD-NAME>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update your app
|
||||||
|
|
||||||
|
Edit your `server.js` file to return a new message:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
response.end('Hello World Again!');
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Build a new version of your image:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker build -t hello-node:v2 .
|
||||||
|
```
|
||||||
|
|
||||||
|
Update the image of your Deployment:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl set image deployment/hello-node hello-node=hello-node:v2
|
||||||
|
```
|
||||||
|
|
||||||
|
Run your app again to view the new message:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
minikube service hello-node
|
||||||
|
```
|
||||||
|
|
||||||
|
### Clean up
|
||||||
|
|
||||||
|
Now you can clean up the resources you created in your cluster:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
kubectl delete service hello-node
|
||||||
|
kubectl delete deployment hello-node
|
||||||
|
```
|
||||||
|
|
||||||
|
Optionally, stop Minikube:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
minikube stop
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
|
||||||
|
{% capture whatsnext %}
|
||||||
|
|
||||||
|
* Learn more about [Deployment objects](/docs/user-guide/deployments/).
|
||||||
|
* Learn more about [Deploying applications](http://localhost:4000/docs/user-guide/deploying-applications/).
|
||||||
|
* Learn more about [Service objects](/docs/user-guide/services/).
|
||||||
|
|
||||||
|
{% endcapture %}
|
||||||
|
|
||||||
|
{% include templates/tutorial.md %}
|
||||||
@@ -101,7 +101,7 @@ should have four pods:
|
|||||||
|
|
||||||
1. Verify that the Deployment has four pods:
|
1. Verify that the Deployment has four pods:
|
||||||
|
|
||||||
kubectl get pods
|
kubectl get pods -l app=nginx
|
||||||
|
|
||||||
The output is similar to this:
|
The output is similar to this:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
var handleRequest = function(request, response) {
|
||||||
|
console.log('Received request for URL: ' + request.url);
|
||||||
|
response.writeHead(200);
|
||||||
|
response.end('Hello World!');
|
||||||
|
};
|
||||||
|
var www = http.createServer(handleRequest);
|
||||||
|
www.listen(8080);
|
||||||
@@ -182,9 +182,8 @@ From within a pod the recommended ways to connect to API are:
|
|||||||
Kubernetes API to the localhost interface of the pod, so that other processes
|
Kubernetes API to the localhost interface of the pod, so that other processes
|
||||||
in any container of the pod can access it. See this [example of using kubectl proxy
|
in any container of the pod can access it. See this [example of using kubectl proxy
|
||||||
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
|
in a pod](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/kubectl-container/).
|
||||||
- use the Go client library, and create a client using the `client.NewInCluster()` factory.
|
- use the Go client library, and create a client using the `rest.InClusterConfig()` and `kubernetes.NewForConfig()` functions.
|
||||||
This handles locating and authenticating to the apiserver. See this [example of using Go client
|
They handle locating and authenticating to the apiserver. [example](https://github.com/kubernetes/client-go/blob/master/examples/in-cluster/main.go)
|
||||||
library in a pod](https://github.com/kubernetes/client-go/blob/master/examples/in-cluster/main.go).
|
|
||||||
|
|
||||||
In each case, the credentials of the pod are used to communicate securely with the apiserver.
|
In each case, the credentials of the pod are used to communicate securely with the apiserver.
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user