kubeblocks icon indicating copy to clipboard operation
kubeblocks copied to clipboard

[TEST] deploy KB with 3 replicas , distributed on 3 nodes.

Open shanshanying opened this issue 9 months ago • 1 comments

  • ref to: https://github.com/apecloud/kubeblocks/pull/7352

Case two cases:

  1. upgrade KB from previous version to 0.8.3 --> upgrade success
  2. install KB 083 with values specifying:
    • replicas
    • kb lables
    • kb affinity
    • dp lables (dp for dataprotection)
    • dp affinity installation success, and 3 KB replicas are distributed on 3 DIFFERNET nodes.

here is an example of values.yaml to test:

replicaCount: 3
image:
  tag: 0.8.3-beta.19
extraLables:
  app.kubernetes.io/component: "kubeblocks"
tolerations:
- key: kb-controller
  operator: Equal
  value: "true"
  effect: NoSchedule
affinity:
  nodeAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
    - weight: 100
      preference:
        matchExpressions:
        - key: kb-controller
          operator: In
          values:
          - "true"
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
    - labelSelector:
        matchLabels:
          app.kubernetes.io/instance: kubeblocks
          app.kubernetes.io/component: "kubeblocks"
      topologyKey: kubernetes.io/hostname
dataProtection:
  image:
    tag: 0.8.3-beta.19
  affinity:
    nodeAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        preference:
          matchExpressions:
          - key: kb-controller
            operator: In
            values:
            - "true"
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchLabels:
            app.kubernetes.io/instance: kubeblocks
            app.kubernetes.io/component: "dataprotection"
        topologyKey: kubernetes.io/hostname
  extraLables:
    app.kubernetes.io/component: "dataprotection"

shanshanying avatar May 15 '24 08:05 shanshanying

helm upgrade kubeblocks kb-charts/kubeblocks-0.8.3-beta.22.tgz -i -n kb-system -f kubeblocks-valuse.yaml 
coalesce.go:289: warning: destination for kubeblocks.dataProtection.extraLables is a table. Ignoring non-table value ([])
coalesce.go:237: warning: skipped value for kubeblocks.extraLables: Not a table.
W0515 21:03:19.755735    5043 warnings.go:70] Due to the lack of practical use cases, this API is deprecated from KB 0.9.0.
W0515 21:03:19.757094    5043 warnings.go:70] Due to the lack of practical use cases, this API is deprecated from KB 0.9.0.
W0515 21:03:19.760464    5043 warnings.go:70] Due to the lack of practical use cases, this API is deprecated from KB 0.9.0.
Error: UPGRADE FAILED: cannot patch "kubeblocks-dataprotection" with kind Deployment: Deployment.apps "kubeblocks-dataprotection" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/component":"dataprotection", "app.kubernetes.io/instance":"kubeblocks", "app.kubernetes.io/name":"kubeblocks"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch "kubeblocks" with kind Deployment: Deployment.apps "kubeblocks" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/component":"kubeblocks", "app.kubernetes.io/instance":"kubeblocks", "app.kubernetes.io/name":"kubeblocks"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

JashBook avatar May 15 '24 13:05 JashBook

  1. try INSTALL a new version ,with above mentioned values (to make sure all newly installed KB can be distributed)
  2. upgrade without any new values (to make sure all previously installed versioin can be upgrade)
  3. there is a typo extraLables in my prevous post, fixed as extraLabels.

shanshanying avatar May 20 '24 01:05 shanshanying

Only 3 nodes, addon pod schedule failed: didn't match pod anti-affinity rules with kubeblocks https://github.com/apecloud/kubeblocks/issues/7426 After increasing nodes to more than 3, install and upgrade kubeblocks were successful.

JashBook avatar May 27 '24 07:05 JashBook

This issue has been marked as stale because it has been open for 30 days with no activity

github-actions[bot] avatar Jul 01 '24 00:07 github-actions[bot]