Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating EndpointSlice documentation for beta release in 1.17 #17411

Merged
merged 1 commit into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions content/en/docs/concepts/services-networking/endpoint-slices.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ weight: 10

{{% capture overview %}}

{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
{{< feature-state for_k8s_version="v1.17" state="beta" >}}

_Endpoint Slices_ provide a simple way to track network endpoints within a
Kubernetes cluster. They offer a more scalable and extensible alternative to
Expand All @@ -26,7 +26,7 @@ Endpoints.

## Endpoint Slice resources {#endpointslice-resource}

In Kubernetes, an Endpoint Slice contains references to a set of network
In Kubernetes, an EndpointSlice contains references to a set of network
endpoints. The EndpointSlice controller automatically creates Endpoint Slices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(if #16885 lands, I can add a page about that specific controller).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I've got some slides that help explain the logic in that controller if that's helpful.

for a Kubernetes Service when a selector is specified. These Endpoint Slices
will include references to any Pods that match the Service selector. Endpoint
Expand All @@ -36,21 +36,20 @@ As an example, here's a sample EndpointSlice resource for the `example`
Kubernetes Service.

```yaml
apiVersion: discovery.k8s.io/v1alpha1
apiVersion: discovery.k8s.io/v1beta1
kind: EndpointSlice
metadata:
name: example-abc
labels:
kubernetes.io/service-name: example
addressType: IP
addressType: IPv4
ports:
- name: http
protocol: TCP
port: 80
endpoints:
- addresses:
- "10.1.2.3"
- "2001:db8::1234:5678"
conditions:
ready: true
hostname: pod-1
Expand All @@ -67,6 +66,14 @@ Endpoint Slices can act as the source of truth for kube-proxy when it comes to
how to route internal traffic. When enabled, they should provide a performance
improvement for services with large numbers of endpoints.

## Address Types

EndpointSlices support three address types:

* IPv4
robscott marked this conversation as resolved.
Show resolved Hide resolved
* IPv6
* FQDN (Fully Qualified Domain Name)

## Motivation

The Endpoints API has provided a simple and straightforward way of
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/concepts/services-networking/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ selectors and uses DNS names instead. For more information, see the
[ExternalName](#externalname) section later in this document.

### Endpoint Slices
{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
{{< feature-state for_k8s_version="v1.17" state="beta" >}}

Endpoint Slices are an API resource that can provide a more scalable alternative
to Endpoints. Although conceptually quite similar to Endpoints, Endpoint Slices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ different Kubernetes components.
| `DynamicAuditing` | `false` | Alpha | 1.13 | |
| `DynamicKubeletConfig` | `false` | Alpha | 1.4 | 1.10 |
| `DynamicKubeletConfig` | `true` | Beta | 1.11 | |
| `EndpointSlice` | `false` | Alpha | 1.16 | |
| `EndpointSlice` | `false` | Alpha | 1.16 | 1.16 |
| `EndpointSlice` | `false` | Beta | 1.17 | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robscott , should line 90 set the beta feature gate to true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly no, we ended up switching it to disabled by default (kubernetes/kubernetes#85365)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I was under the impression that all beta features were enabled by default.

| `EphemeralContainers` | `false` | Alpha | 1.16 | |
| `ExpandCSIVolumes` | `false` | Alpha | 1.14 | 1.15 |
| `ExpandCSIVolumes` | `true` | Beta | 1.16 | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resources instead of a single large Endpoints resource.

## Enabling Endpoint Slices

{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
{{< feature-state for_k8s_version="v1.17" state="beta" >}}

{{< note >}}
Although Endpoint Slices may eventually replace Endpoints, many Kubernetes
Expand All @@ -36,19 +36,7 @@ seen as an addition to Endpoints in a cluster, not a replacement for them.
{{< /note >}}

As an alpha feature, Endpoint Slices are not enabled by default in Kubernetes.
Enabling Endpoint Slices requires as many as 3 changes to Kubernetes cluster
configuration.

To enable the Discovery API group that includes Endpoint Slices, use the runtime
config flag (`--runtime-config=discovery.k8s.io/v1alpha1=true`).

The logic responsible for watching services, pods, and nodes and creating or
updating associated Endpoint Slices lives within the EndpointSlice controller.
This is disabled by default but can be enabled with the controllers flag on
kube-controller-manager (`--controllers=endpointslice`).

For Kubernetes components like kube-proxy to actually start using Endpoint
Slices, the EndpointSlice feature gate will need to be enabled
To enable them, the EndpointSlice feature gate will need to be enabled
(`--feature-gates=EndpointSlice=true`).

## Using Endpoint Slices
Expand All @@ -57,4 +45,4 @@ With Endpoint Slices fully enabled in your cluster, you should see corresponding
EndpointSlice resources for each Endpoints resource. In addition to supporting
existing Endpoints functionality, Endpoint Slices should include new bits of
information such as topology. They will allow for greater scalability and
extensibility of network endpoints in your cluster.
extensibility of network endpoints in your cluster.