Apply concept template to extend-kubernetes and configuration dirs (#8995)

This commit is contained in:
Misty Stanley-Jones
2018-06-11 12:38:26 -07:00
committed by k8s-ci-robot
parent b11a514313
commit 89a06bdb29
9 changed files with 112 additions and 15 deletions
@@ -3,14 +3,19 @@ reviewers:
- rickypai
- thockin
title: Adding entries to Pod /etc/hosts with HostAliases
content_template: templates/concept
weight: 60
---
{{< toc >}}
{{% capture overview %}}
Adding entries to a Pod's /etc/hosts file provides Pod-level override of hostname resolution when DNS and other options are not applicable. In 1.7, users can add these custom entries with the HostAliases field in PodSpec.
Modification not using HostAliases is not suggested because the file is managed by Kubelet and can be overwritten on during Pod creation/restart.
{{% /capture %}}
{{% capture body %}}
## Default Hosts File Content
@@ -91,3 +96,9 @@ In 1.8, HostAlias is supported for all Pods regardless of network configuration.
Kubelet [manages](https://github.com/kubernetes/kubernetes/issues/14633) the hosts file for each container of the Pod to prevent Docker from [modifying](https://github.com/moby/moby/issues/17190) the file after the containers have already been started.
Because of the managed-nature of the file, any user-written content will be overwritten whenever the hosts file is remounted by Kubelet in the event of a container restart or a Pod reschedule. Thus, it is not suggested to modify the contents of the file.
{{% /capture %}}
{{% capture whatsnext %}}
{{% /capture %}}
@@ -4,11 +4,14 @@ reviewers:
- lavalamp
- thockin
title: Connecting Applications with Services
content_template: templates/concept
weight: 30
---
{{< toc >}}
{{% capture overview %}}
## The Kubernetes model for connecting containers
Now that you have a continuously running, replicated application you can expose it on a network. Before discussing the Kubernetes approach to networking, it is worthwhile to contrast it with the "normal" way networking works with Docker.
@@ -19,6 +22,10 @@ Coordinating ports across multiple developers is very difficult to do at scale a
This guide uses a simple nginx server to demonstrate proof of concept. The same principles are embodied in a more complete [Jenkins CI application](http://blog.kubernetes.io/2015/07/strong-simple-ssl-for-kubernetes.html).
{{% /capture %}}
{{% capture body %}}
## Exposing pods to the cluster
We did this in a previous example, but let's do it once again and focus on the networking perspective. Create an nginx pod, and note that it has a container port specification:
@@ -319,10 +326,15 @@ LoadBalancer Ingress: a320587ffd19711e5a37606cf4a74574-1142138393.us-east-1.el
...
```
## Further reading
{{% /capture %}}
{{% capture whatsnext %}}
Kubernetes also supports Federated Services, which can span multiple
clusters and cloud providers, to provide increased availability,
better fault tolerance and greater scalability for your services. See
the [Federated Services User Guide](/docs/concepts/cluster-administration/federation-service-discovery/)
for further information.
{{% /capture %}}
@@ -11,7 +11,7 @@ weight: 40
{{% /capture %}}
{{% capture body %}}
__Terminology__
## Terminology
Throughout this doc you will see a few terms that are sometimes used interchangeably elsewhere, that might cause confusion. This section attempts to clarify them.
@@ -25,7 +25,7 @@ Throughout this doc you will see a few terms that are sometimes used interchange
Typically, services and pods have IPs only routable by the cluster network. All traffic that ends up at an edge router is either dropped or forwarded elsewhere. Conceptually, this might look like:
```
```none
internet
|
------------
@@ -172,7 +172,7 @@ The Ingress controller will provision an implementation specific loadbalancer th
Name-based virtual hosts use multiple host names for the same IP address.
```
```none
foo.bar.com --| |-> foo.bar.com s1:80
| 178.91.123.132 |
bar.foo.com --| |-> bar.foo.com s2:80
@@ -313,4 +313,7 @@ You can expose a Service in multiple ways that don't directly involve the Ingres
* Use a [Port Proxy](https://git.k8s.io/contrib/for-demos/proxy-to-service)
{{% /capture %}}
{{% capture whatsnext %}}
{{% /capture %}}
@@ -4,15 +4,20 @@ reviewers:
- caseydavenport
- danwinship
title: Network Policies
content_template: templates/concept
weight: 50
---
{{< toc >}}
{{% capture overview %}}
A network policy is a specification of how groups of pods are allowed to communicate with each other and other network endpoints.
`NetworkPolicy` resources use labels to select pods and define rules which specify what traffic is allowed to the selected pods.
{{% /capture %}}
{{% capture body %}}
## Prerequisites
Network policies are implemented by the network plugin, so you must be using a networking solution which supports `NetworkPolicy` - simply creating the resource without a controller to implement it will have no effect.
@@ -184,8 +189,13 @@ spec:
This ensures that even pods that aren't selected by any other NetworkPolicy will not be allowed ingress or egress traffic.
## What's next?
{{% /capture %}}
{{% capture whatsnext %}}
- See the [Declare Network Policy](/docs/tasks/administer-cluster/declare-network-policy/)
walkthrough for further examples.
- See more [Recipes](https://github.com/ahmetb/kubernetes-network-policy-recipes) for common scenarios enabled by the NetworkPolicy resource.
{{% /capture %}}
@@ -2,9 +2,14 @@
reviewers:
- bprashanth
title: Services
content_template: templates/concept
weight: 10
---
{{< toc >}}
{{% capture overview %}}
Kubernetes [`Pods`](/docs/concepts/workloads/pods/pod/) are mortal. They are born and when they die, they
are not resurrected. [`ReplicaSets`](/docs/concepts/workloads/controllers/replicaset/) in
particular create and destroy `Pods` dynamically (e.g. when scaling up or down). While each `Pod` gets its own IP address, even
@@ -33,7 +38,9 @@ that is updated whenever the set of `Pods` in a `Service` changes. For
non-native applications, Kubernetes offers a virtual-IP-based bridge to Services
which redirects to the backend `Pods`.
{{< toc >}}
{{% /capture %}}
{{% capture body %}}
## Defining a service
@@ -890,6 +897,11 @@ Service is a top-level resource in the Kubernetes REST API. More details about t
API object can be found at:
[Service API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#service-v1-core).
## For More Information
{{% /capture %}}
{{% capture whatsnext %}}
Read [Connecting a Front End to a Back End Using a Service](/docs/tasks/access-application-cluster/connecting-frontend-backend/).
{{% /capture %}}