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

Service topology alpha documentation #17459

Merged

Conversation

johnbelamaric
Copy link
Member

Placeholder docs PR for kubernetes/enhancements#536

/sig network

@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 6, 2019
@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Nov 6, 2019

Deploy preview for kubernetes-io-vnext-staging processing.

Building with commit 461c486

https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/5dd8613bac0d5700091ad7ee

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Nov 6, 2019
@johnbelamaric
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 6, 2019
@tengqm tengqm added this to the 1.17 milestone Nov 7, 2019

{{% capture whatsnext %}}

* [Enabling Service Topology](/docs/tasks/administer-cluster/enabling-service-topology)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* [Enabling Service Topology](/docs/tasks/administer-cluster/enabling-service-topology)
* Read about [enabling Service Topology](/docs/tasks/administer-cluster/enabling-service-topology/)

@imroc
Copy link

imroc commented Nov 7, 2019

Can you add me as collaborator to your repo? I can help to write the docs, push commit to your remote branch. Or maybe I can just request change to add suggested content.

@imroc
Copy link

imroc commented Nov 7, 2019

Prerequisites

The following prerequisites are needed in order to enable topology aware service routing:

  • Kubernetes 1.17 or later
  • Kube-proxy running in mode IPVS or Iptables
  • Enable Endpoint Slices (enabled by default since v1.17)

@imroc
Copy link

imroc commented Nov 7, 2019

Enable Service Topology

To enable service topology, enable the ServiceTopology feature gate for the kube-proxy:

--feature-gates="ServiceTopology=true"

@johnbelamaric
Copy link
Member Author

You can submit PRs against my fork if you want. Or I can incorporate your suggestions.

@imroc
Copy link

imroc commented Nov 8, 2019

You can submit PRs against my fork if you want. Or I can incorporate your suggestions.

I'm going to submit PRs against your fork.

@daminisatya
Copy link
Contributor

@imroc @johnbelamaric Just a reminder about the last Docs deadline - 22nd Nov, by which this PR needs to be merged!

@imroc
Copy link

imroc commented Nov 21, 2019

Sorry for the delay. I think I can just comment the suggestions to this PR, and @johnbelamaric write to the commits.

@imroc
Copy link

imroc commented Nov 21, 2019

Motivation

Figure out a generic way to implement the "local service" route, say "topology aware routing of service", simply call it "service topology".

Locality is defined by user, it can be any topology-related thing. "Local" means the "same topology level", e.g. same node, same rack, same failure zone, same failure region, same cloud provider etc. Two nodes are considered "local" if they have the same value for a particular label, called the "topology key".

@imroc
Copy link

imroc commented Nov 21, 2019

Topology Keys

If your cluster has Service Topology enabled, you can create Services with topology keys by setting a field: .spec.topologyKeys.

topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value "*" may be used to mean "any topology". This catch-all value, if used, only makes sense as the last value in the list. If topologyKeys is not specified or empty, no topology constraints will be applied.

@imroc
Copy link

imroc commented Nov 21, 2019

Can I fire another PR on this? I can respond quickly to the review, help to make the service topology documentation gets merged before Docs deadline.

@johnbelamaric
Copy link
Member Author

If you want that's fine with me, I am at KubeCon. Otherwise I can get to this later tonight or tomorrow morning.

@imroc
Copy link

imroc commented Nov 22, 2019

Just using this PR then. I am a little busy too, try to take the time to write the doc.

@imroc
Copy link

imroc commented Nov 22, 2019

Introduction

Service Topology makes it possible for network traffic of service to be forwarded nearby, reducing network hops and improving network performance. It uses topology keys to decide the preferred topological domains to be used, e.g. node, rack, zone, region, etc.

@imroc
Copy link

imroc commented Nov 22, 2019

Using Topology Keys

apiVersion: v1
kind: Service
metadata:
  name: nginx
spec:
  type: ClusterIP
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: nginx
  topologyKeys: ["kubernetes.io/hostname", "topology.kubernetes.io/zone", "*"]

please help to describe this 😅

@daminisatya
Copy link
Contributor

@johnbelamaric Update on this PR?

@johnbelamaric
Copy link
Member Author

I am working on this now and will have an update within the hour. Thanks for your patience, it's been a hectic week!

@johnbelamaric
Copy link
Member Author

/assign @robscott

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on these docs! I just caught a few small things.

@johnbelamaric
Copy link
Member Author

Thanks @robscott for the review! @daminisatya I think we are good to go now, assuming Rob can LGTM with the latest.

@robscott
Copy link
Member

Thanks!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 22, 2019
Copy link

@imroc imroc left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this. Almost is lgtm, only one small thing needs confirmation.


{{% capture whatsnext %}}

* Read about [enabling Service Topology](/docs/tasks/administer-cluster/enabling-service-topology)
Copy link

@imroc imroc Nov 23, 2019

Choose a reason for hiding this comment

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

nit: enabling --> Enabling

And currently the doc Enabling Service Topology is not exists, will it be added in later commit or another PR?

Copy link
Member

Choose a reason for hiding this comment

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

Added in this PR #17808 PTAL

@johnbelamaric
Copy link
Member Author

johnbelamaric commented Nov 23, 2019 via email

@imroc
Copy link

imroc commented Nov 23, 2019

Maybe we don't need it, just add an simple Service example in this doc?

@daminisatya
Copy link
Contributor

/lgtm

@johnbelamaric Thank you for the PR. let me know once it is final, I will approve it.

Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

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

/lgtm

feature:
title: Service Topology
description: >
Routing of service traffice based upon cluster topology.
Copy link
Member

Choose a reason for hiding this comment

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

s/traffice/traffic

Copy link
Member

Choose a reason for hiding this comment

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

^ I can fix this in a follow-up PR, I have some other changes I'd like to add :)

@daminisatya
Copy link
Contributor

@johnbelamaric Kindly update the PR with these small review comments ASAP!

@daminisatya
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: daminisatya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2019
@andrewsykim
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 26, 2019
@k8s-ci-robot k8s-ci-robot merged commit 4ff6d5e into kubernetes:dev-1.17 Nov 26, 2019
@johnbelamaric
Copy link
Member Author

Thanks all for following up on this, I was OOO and had very limited network access the last few days!

@johnbelamaric johnbelamaric deleted the service-topology-docs branch November 28, 2019 00:15
k8s-ci-robot pushed a commit that referenced this pull request Dec 10, 2019
* feat: graduate TaintNodesByCondition to GA (#17073)

* Promote StartupProbe to beta (enabled by default). (#17164)

* Watch bookmarks to GA (#17026)

* feat: graduate ScheduleDaemonSetPods to GA (#17350)

* Update Docker installation instructions (#17405)

* Use exact version numbers for installing Docker in Ubuntu (#17428)

* Move CSIMigration and CSIMigrationGCE to Beta in Kubernetes v1.17 (#17478)

* Promote NodeLease feature to GA (#17189)

* Update docs for csi topology ga (#17408)

* Update RunAsUsername to beta (#17460)

* doc:Update RunAsUsername to beta

* doc: update samples - kubernetes.io/os is no longer beta

* Updating based on review feedback

* Promote Node-specific volume limits to GA (#17432)

* Promote PodShareProcessNamespace to stable (#17192)

* Promote PodShareProcessNamespace to stable

* Add for_k8s_version to feature-state label

Co-Authored-By: Tim Bannister <tim@scalefactory.com>

* Readd version-check to shareProcessNamespace task

* Update service load balancer finalizer doc for GA (#17438)

* Update Topology Manager docs (#17451)

* Added information on how device plugins can take advantage
of Topology Manager
* Updated the Topology Manager documentation to include additionalinformation and update some out of date sections

* Fix broken Topology Manager link (#17746)

Part of What's Next Device Plugin section

* Update CRD defaulting docs for GA (#17450)

* Add documentation for VolumeSnapshot Beta (#17233)

* Updating EndpointSlice documentation for beta release in 1.17 (#17411)

* (docs/dualstack): v1.17 updates (#17457)

* Add placehold doc updates for dualstack in 1.17

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* Add Downward API and /etc/hosts Pod IP validation

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* remove addressed known issue via k/k pr 85246

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* Remove known issue and add flag as part of k/k 79993

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* remove follow up placeholders

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* Update verbiage

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* Make IP addressing consistent throughout the task

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* Update to status.podIPs

Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com>

* Update content/en/docs/tasks/network/validate-dual-stack.md

Use set instead of env

Co-Authored-By: Khaled Henidak (Kal) <khnidk@outlook.com>

* add topology.kubernetes.io/zone, topology.kubernetes.io/region and node.kubernetes.io/instance-type labels to docs (#17498)

Signed-off-by: Andrew Sy Kim <kiman@vmware.com>

* Service topology alpha documentation (#17459)

* Update list of feature flags for in-tree plugins migrated to CSI (#17533)

Signed-off-by: Deep Debroy <ddebroy@docker.com>

* Update Node concept for TaintNodesByCondition going GA (#17577)

* feat: graduate ResourceQuotaScopeSelectors to GA in 1.17 (#17554)

* kubeadm: update the upgrade documentation for 1.17 (#17587)

* doc: Simplify Windows deployments with RuntimeClass (#16697)

* doc: Simplify Windows deployments with RuntimeClass

* Updating on review feedback

* doc: Adding windows-build label from enhancement 1301

* update doc for kubelet option --reserved-cpus (#17648)

* feat: update TaintNodesByCondition in feature gates table (#17377)

* Update docs for v1 resource quota configuration (#17547)

* AdmissionConfiguration v1 (#17548)

* Update WebhookAdmissionConfiguration examples (#17549)

* Update AWS EBS Migration Feature state (#16126)

* Add resource version section to api-concepts documentation (#16910)

* Add Resource Version semantics section to api concepts

* Clarify risks of going back in time, add details about compaction and watch cache sizes

* Apply suggestions from liggitt

Co-Authored-By: Jordan Liggitt <jordan@liggitt.net>

* remove pesudocode, apply feedback

* Fix typo

* Clarify equality rules

* Cleanup kubectl generators docs (#17609)

* Write ReplicationController without a space

* Drop mentioning unsupported cluster versions

* Fix capitalization for “API group”

* Tweak wording

* Avoid using deprecated generator in example

* add Antrea description in dev-1.17 (#17919)

* Promote VolumeSubpathEnvExpansion to GA

* Reference Documentation for the Kubernetes API for 1.17 (#18019)

* Update feature-gates.md (#18033)

* Reference Documentation for kubectl Commands for 1.17 (#18017)

* Update for v1.17 (#18034)

* Update config.toml(release-1.17) for 1.17 (#18031)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/network Categorizes an issue or PR as relevant to SIG Network. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants