nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
337 stars 268 forks source link

Error updating Endpoint Slices for Service nextcloud/nextcloud #14

Closed papanito closed 4 months ago

papanito commented 4 years ago

The nextcloud pod does not start but eventually fails. I can see this event logged:

8m40s       Warning   FailedToUpdateEndpointSlices   service/nextcloud                Error updating Endpoint Slices for Service nextcloud/nextcloud: Error deleting nextcloud-lv57c EndpointSlice for Service nextcloud/nextcloud: endpointslices.discovery.k8s.io "nextcloud-lv57c" not found

The pod itself stuck at

Initializing nextcloud 19.0.0.8 ...

Reproduction steps

Installation using the helm chart and the values.yml given below

helm upgrade nextcloud nextcloud/nextcloud --namespace nextcloud -f nextcloud.values.yml

kubectl version

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.5", GitCommit:"e6503f8d8f769ace2f338794c914a96fc335df0f", GitTreeState:"archive", BuildDate:"2020-09-03T15:34:56Z", GoVersion:"go1.15.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Values.yml

image:
  repository: nextcloud
  tag: 19.0.0
  pullPolicy: IfNotPresent

nameOverride: ""
fullnameOverride: ""

replicaCount: 1

ingress:
  enabled: true
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 4G
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    cert-manager.io/cluster-issuer: "letsencrypt-prd"
  tls:
    - secretName: nextcloud-tls
      hosts:
        - REDACTED
  labels: {}

nextcloud:
  host: REDACTED
  username: REDACTED
  password: REDACTED
  update: 0
  datadir: /var/www/html/data
  tableprefix:
  defaultConfigs:
    .htaccess: true
    redis.config.php: true
    apache-pretty-urls.config.php: true
    apcu.config.php: true
    apps.config.php: true
    autoconfig.php: true
    smtp.config.php: true

nginx:
  enabled: false
  image:
    repository: nginx
    tag: alpine
    pullPolicy: IfNotPresent
  config:
    default: true

  resources: {}

internalDatabase:
  enabled: false
  name: nextcloud

externalDatabase:
  enabled: false

mariadb:
  enabled: true
  volumePermissions:
    enabled: true
    securityContext:
      fsGroup: 1001
      runAsUser: 1001
  db:
    name: nextcloud
    user: REDACTED
    password: REDACTED
  persistence:
    enabled: true
    accessMode: ReadWriteOnce
    size: 8Gi
  master:
    persistence:
      accessModes: 
        - ReadWriteOnce
  slave:
    persistence:
      accessModes:
        - ReadWriteOnce
redis:
  enabled: false
  usePassword: false

cronjob:
  enabled: true
  schedule: "*/15 * * * *"
  annotations: {}
  curlInsecure: false
  failedJobsHistoryLimit: 5
  successfulJobsHistoryLimit: 2
service:
  type: ClusterIP
  port: 8080
  loadBalancerIP: nil

persistence:
  enabled: true
  storageClass: "kadalu.replica3"
  accessMode: ReadWriteOnce
  size: 500Gi

livenessProbe:
  enabled: true
  initialDelaySeconds: 30
  periodSeconds: 15
  timeoutSeconds: 5
  failureThreshold: 3
  successThreshold: 1
readinessProbe:
  enabled: true
  initialDelaySeconds: 30
  periodSeconds: 15
  timeoutSeconds: 5
  failureThreshold: 3
  successThreshold: 1

Additional info

Interestingly is also, that I only see one mariadb-pod where I would expect a master and a slave according to my initial tries, using the helm chart from the previous repo

nextcloud-1599540300-bvnmc   0/1     Error              0          8m35s
nextcloud-1599540300-jhskn   0/1     Error              0          7m53s
nextcloud-1599540300-k7qjq   0/1     Error              0          2m41s
nextcloud-1599540300-kzpds   0/1     Error              0          6m41s
nextcloud-1599540300-smvxj   0/1     Error              0          7m42s
nextcloud-1599540300-tnwgf   0/1     Error              0          7m22s
nextcloud-75fff49d4c-pcc2z   0/1     CrashLoopBackOff   5          15m
nextcloud-mariadb-0          1/1     Running            0          19h
$ kubectl -n nextcloud get pvc
NAME                  STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
nextcloud-nextcloud   Bound    pvc-bd1cc26a-c959-422a-a49e-02714da099ef   500Gi      RWO            kadalu.replica3   19h
jessebot commented 1 year ago

Hoi, coming into this pretty late, so please bare with me :)

Since this setup is out of date, would you mind testing with a recent version of kubernetes and the latest version of the helm chart? We've also updated our stock values.yaml here: https://github.com/nextcloud/helm/blob/master/charts/nextcloud/values.yaml

If the problem persists, please post your current values.yaml and the error you're getting now, and I'll take a look :)

jessebot commented 4 months ago

I'm going to close this as stale as it's been a year with no reply. If you want to test with the latest version of the chart (which includes more recent version of mariadb too) and let us know if it's still broken in a new Issue, we'd love to help you out.

One last thing: if you do open a new issue, it would be helpful to get the output of your nextcloud pod logs, as well as what it actually says in the nextcloud level log, which you can learn more about setting here: https://github.com/nextcloud/helm/tree/main/charts/nextcloud#logging