website icon indicating copy to clipboard operation
website copied to clipboard

Issue with k8s.io/docs/concepts/workloads/controllers/statefulset/

Open diepes opened this issue 2 years ago • 7 comments

After reading the documentation i am still not sure how i would configure a statefullset to ensure the deployment to specific availability zones using node affinity.

goal fix db statefullset instances in separate availability zone's using labels on nodes. e.g.

db-0 -> zone-1
db-1 -> zone-2
db-2 -> zone-3

This is to ensure that the same $(ordinal) lands in the same zone where it can access it's PVC.

I tried something like this, but my understand is it will not achieve the mapping required above. need something like '- "australiaeast-${ordinal}"'

    affinity:  # db
      nodeAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
        - weight: 10
          preference:
            matchExpressions:
            - key: "topology.kubernetes.io/zone"
              operator: In
              values:
              - "australiaeast-1"
              - "australiaeast-2"
              - "australiaeast-3"

Is this possible (just not in documentation) or something k8s can't do currently ?

diepes avatar Jun 25 '23 07:06 diepes

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jun 25 '23 07:06 k8s-ci-robot

/language en

pranav-pandey0804 avatar Jun 25 '23 08:06 pranav-pandey0804

/sig scheduling /kind support

utkarsh-singh1 avatar Jun 25 '23 12:06 utkarsh-singh1

I think the ideal answer is to add a new set of tutorials, https://kubernetes.io/docs/tutorials/storage/. A tutorial to explain static PV provisioning for statefulsets could be the first to go into that new section. If someone wants to write it.


If someone wants to blog about the different ways people solve this challenge, and make that blog article evergreen, we could link from https://k8s.io/docs/concepts/workloads/controllers/statefulset/ to the new article.

There is https://kubernetes.io/blog/2018/10/11/topology-aware-volume-provisioning-in-kubernetes/ but it is only a small part of the picture and not maintained.

@diepes you might like to ask for advice on Server Fault, or a similar web forum. Also there are tutorials elsewhere on the web, just not in these docs. We're open to contributions; the tutorial I'm imagining is a fair chunk of work.

sftim avatar Jun 26 '23 21:06 sftim

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 23 '24 09:01 k8s-triage-robot

/remove-kind support

Let's triage this and decide whether the docs still merit an improvement.

/remove-lifecycle stale

sftim avatar Feb 04 '24 11:02 sftim

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar May 04 '24 12:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Jun 03 '24 12:06 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Jul 03 '24 13:07 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Jul 03 '24 13:07 k8s-ci-robot