dokku / dokku

A docker-powered PaaS that helps you build and manage the lifecycle of applications
https://dokku.com
MIT License
29.3k stars 1.92k forks source link

Clarify in k3s documentation that a registry is required #6732

Closed pierredup closed 7 months ago

pierredup commented 8 months ago

Description of problem

Switching the scheduler to k3s, doesn't deploy the app due to the image not being available. The pod status is stuck in ImagePullBackOff.

Steps to reproduce

dokku report $APP_NAME

-----> uname: Linux dokku 5.15.0-100-generic #110-Ubuntu SMP Wed Feb 7 13:27:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
                      total        used        free      shared  buff/cache   available
       Mem:            7935        1830         253          12        5852        5785
       Swap:           4095          23        4072
-----> docker version:
       Client: Docker Engine - Community
        Version:           25.0.4
        API version:       1.44
        Go version:        go1.21.8
        Git commit:        1a576c5
        Built:             Wed Mar  6 16:32:12 2024
        OS/Arch:           linux/amd64
        Context:           default

       Server: Docker Engine - Community
        Engine:
         Version:          25.0.4
         API version:      1.44 (minimum version 1.24)
         Go version:       go1.21.8
         Git commit:       061aa95
         Built:            Wed Mar  6 16:32:12 2024
         OS/Arch:          linux/amd64
         Experimental:     false
        containerd:
         Version:          1.6.28
         GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
        runc:
         Version:          1.1.12
         GitCommit:        v1.1.12-0-g51d5e94
        docker-init:
         Version:          0.19.0
         GitCommit:        de40ad0
-----> docker daemon info:
       Client: Docker Engine - Community
        Version:    25.0.4
        Context:    default
        Debug Mode: true
        Plugins:
         buildx: Docker Buildx (Docker Inc.)
           Version:  v0.13.0
           Path:     /usr/libexec/docker/cli-plugins/docker-buildx
         compose: Docker Compose (Docker Inc.)
           Version:  v2.24.7
           Path:     /usr/libexec/docker/cli-plugins/docker-compose

       Server:
        Containers: 79
         Running: 3
         Paused: 0
         Stopped: 76
        Images: 44
        Server Version: 25.0.4
        Storage Driver: overlay2
         Backing Filesystem: extfs
         Supports d_type: true
         Using metacopy: false
         Native Overlay Diff: true
         userxattr: false
        Logging Driver: json-file
        Cgroup Driver: systemd
        Cgroup Version: 2
        Plugins:
         Volume: local
         Network: bridge host ipvlan macvlan null overlay
         Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
        Swarm: inactive
        Runtimes: io.containerd.runc.v2 runc
        Default Runtime: runc
        Init Binary: docker-init
        containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
        runc version: v1.1.12-0-g51d5e94
        init version: de40ad0
        Security Options:
         apparmor
         seccomp
          Profile: builtin
         cgroupns
        Kernel Version: 5.15.0-100-generic
        Operating System: Ubuntu 22.04.4 LTS
        OSType: linux
        Architecture: x86_64
        CPUs: 12
        Total Memory: 7.75GiB
        Name: dokku
        ID: b3b964c4-ca28-4d22-8149-36591fa7b900
        Docker Root Dir: /var/lib/docker
        Debug Mode: false
         File Descriptors: 47
         Goroutines: 65
         System Time: 2024-03-18T13:13:07.875684197Z
         EventsListeners: 1
        Experimental: false
        Insecure Registries:
         127.0.0.0/8
        Live Restore Enabled: false

-----> herokuish version:
       herokuish: v0.7.3
       buildpacks:
         heroku-buildpack-multi     v1.2.0
         heroku-buildpack-ruby      v265
         heroku-buildpack-nodejs    v235
         heroku-buildpack-clojure   v91
         heroku-buildpack-python    v242
         heroku-buildpack-java      v73
         heroku-buildpack-gradle    v39
         heroku-buildpack-scala     v96
         heroku-buildpack-play      v26
         heroku-buildpack-php       v244
         heroku-buildpack-go        v184
         heroku-buildpack-nginx     v25
         buildpack-null             v3
-----> dokku version: dokku version 0.33.9
-----> dokku-event-listener version: 0.15.0build+5268732
-----> dokku-update version: dokku-update 0.7.2
-----> docker-container-healthchecker version: 0.9.0
-----> docker-image-labeler version: 0.6.1build+c6e15a9
-----> git version: git version 2.34.1
-----> lambda-builder version:        0.6.0
-----> netrc version: 0.8.0build+0751c1b
 !     pack binary is not available
-----> plugn version: plugn: 0.13.0build+fd5297a
-----> sigil version: 0.10.1build+e443be0
-----> sshcommand version: sshcommand 0.17.1
-----> dokku plugins:
         00_dokku-standard    0.33.9 enabled    dokku core standard plugin
         20_events            0.33.9 enabled    dokku core events logging plugin
         app-json             0.33.9 enabled    dokku core app-json plugin
         apps                 0.33.9 enabled    dokku core apps plugin
         builder              0.33.9 enabled    dokku core builder plugin
         builder-dockerfile   0.33.9 enabled    dokku core builder-dockerfile plugin
         builder-herokuish    0.33.9 enabled    dokku core builder-herokuish plugin
         builder-lambda       0.33.9 enabled    dokku core builder-lambda plugin
         builder-nixpacks     0.33.9 enabled    dokku core builder-nixpacks plugin
         builder-null         0.33.9 enabled    dokku core builder-null plugin
         builder-pack         0.33.9 enabled    dokku core builder-pack plugin
         buildpacks           0.33.9 enabled    dokku core buildpacks plugin
         caddy-vhosts         0.33.9 enabled    dokku core caddy-vhosts plugin
         certs                0.33.9 enabled    dokku core certificate management plugin
         checks               0.33.9 enabled    dokku core checks plugin
         common               0.33.9 enabled    dokku core common plugin
         config               0.33.9 enabled    dokku core config plugin
         cron                 0.33.9 enabled    dokku core cron plugin
         docker-options       0.33.9 enabled    dokku core docker-options plugin
         domains              0.33.9 enabled    dokku core domains plugin
         enter                0.33.9 enabled    dokku core enter plugin
         git                  0.33.9 enabled    dokku core git plugin
         haproxy-vhosts       0.33.9 enabled    dokku core haproxy-vhosts plugin
         logs                 0.33.9 enabled    dokku core logs plugin
         mysql                1.38.1 enabled    dokku mysql service plugin
         network              0.33.9 enabled    dokku core network plugin
         nginx-vhosts         0.33.9 enabled    dokku core nginx-vhosts plugin
         openresty-vhosts     0.33.9 enabled    dokku core openresty-vhosts plugin
         plugin               0.33.9 enabled    dokku core plugin plugin
         ports                0.33.9 enabled    dokku core ports plugin
         postgres             1.36.4 enabled    dokku postgres service plugin
         proxy                0.33.9 enabled    dokku core proxy plugin
         ps                   0.33.9 enabled    dokku core ps plugin
         registry             0.33.9 enabled    dokku core registry plugin
         repo                 0.33.9 enabled    dokku core repo plugin
         resource             0.33.9 enabled    dokku core resource plugin
         run                  0.33.9 enabled    dokku core run plugin
         scheduler            0.33.9 enabled    dokku core scheduler plugin
         scheduler-docker-local 0.33.9 enabled    dokku core scheduler-docker-local plugin
         scheduler-k3s        0.33.9 enabled    dokku core scheduler-k3s plugin
         scheduler-null       0.33.9 enabled    dokku core scheduler-null plugin
         shell                0.33.9 enabled    dokku core shell plugin
         ssh-keys             0.33.9 enabled    dokku core ssh-keys plugin
         storage              0.33.9 enabled    dokku core storage plugin
         trace                0.33.9 enabled    dokku core trace plugin
         traefik-vhosts       0.33.9 enabled    dokku core traefik-vhosts plugin
=====> test-app app-json information
       App json computed selected:    app.json
       App json global selected:      app.json
       App json selected:
=====> test-app app information
       App created at:                1710702828
       App deploy source:
       App deploy source metadata:
       App dir:                       /home/dokku/test-app
       App locked:                    false
=====> test-app builder information
       Builder build dir:
       Builder computed build dir:
       Builder computed selected:
       Builder global build dir:
       Builder global selected:
       Builder selected:
=====> test-app builder-dockerfile information
       Builder dockerfile computed dockerfile path: Dockerfile
       Builder dockerfile global dockerfile path: Dockerfile
       Builder dockerfile dockerfile path:
=====> test-app builder-herokuish information
       Builder herokuish computed allowed: true
       Builder herokuish global allowed: true
       Builder herokuish allowed:
=====> test-app builder-lambda information
       Builder lambda computed lambdayml path: lambda.yml
       Builder lambda global lambdayml path: lambda.yml
       Builder lambda lambdayml path:
=====> test-app builder-nixpacks information
       Builder nixpacks computed nixpackstoml path: nixpacks.toml
       Builder nixpacks global nixpackstoml path: nixpacks.toml
       Builder nixpacks nixpackstoml path:
       Builder nixpacks computed no cache: false
       Builder nixpacks global no cache: false
       Builder nixpacks no cache:
=====> test-app builder-pack information
       Builder pack computed projecttoml path: project.toml
       Builder pack global projecttoml path: project.toml
       Builder pack projecttoml path:
=====> test-app buildpacks information
       Buildpacks computed stack:     gliderlabs/herokuish:latest-22
       Buildpacks global stack:
       Buildpacks list:
       Buildpacks stack:
=====> test-app caddy information
       Caddy image:                   lucaslorentz/caddy-docker-proxy:2.8
       Caddy letsencrypt email:
       Caddy letsencrypt server:      https://acme-v02.api.letsencrypt.org/directory
       Caddy log level:               ERROR
       Caddy polling interval:        5s
       Caddy tls internal:            false
=====> test-app ssl information
       Ssl dir:                       /home/dokku/test-app/tls
       Ssl enabled:                   false
       Ssl hostnames:
       Ssl expires at:
       Ssl issuer:
       Ssl starts at:
       Ssl subject:
       Ssl verified:
=====> test-app checks information
       Checks disabled list:          none
       Checks skipped list:           none
       Checks computed wait to retire: 60
       Checks global wait to retire:  60
       Checks wait to retire:
=====> test-app docker options information
       Docker options build:
       Docker options deploy:         --restart=on-failure:10
       Docker options run:
=====> test-app domains information
       Domains app enabled:           true
       Domains app vhosts:            test-app.solidspace.cloud test-app.192.168.1.112.sslip.io
       Domains global enabled:        true
       Domains global vhosts:         solidspace.cloud 192.168.1.112.sslip.io
=====> test-app git information
       Git deploy branch:             main
       Git global deploy branch:      master
       Git keep git dir:              false
       Git rev env var:               GIT_REV
       Git sha:
       Git source image:
       Git last updated at:
=====> test-app haproxy information
       Haproxy image:                 byjg/easy-haproxy:4.4.0
       Haproxy letsencrypt email:
       Haproxy letsencrypt server:    https://acme-v02.api.letsencrypt.org/directory
       Haproxy log level:             ERROR
=====> test-app logs information
       Logs computed max size:        10m
       Logs global max size:          10m
       Logs global vector sink:
       Logs max size:
       Logs vector global image:      timberio/vector:0.36.1-debian
       Logs vector sink:
=====> test-app network information
       Network attach post create:
       Network attach post deploy:
       Network bind all interfaces:          false
       Network computed attach post create:
       Network computed attach post deploy:
       Network computed bind all interfaces: false
       Network computed initial network:
       Network computed tld:
       Network global attach post create:
       Network global attach post deploy:
       Network global bind all interfaces:   false
       Network global initial network:
       Network global tld:
       Network initial network:
       Network static web listener:
       Network tld:
       Network web listeners:
=====> test-app nginx information
       Nginx access log format:
       Nginx computed access log format:
       Nginx global access log format:
       Nginx access log path:
       Nginx computed access log path: /var/log/nginx/test-app-access.log
       Nginx global access log path:  /var/log/nginx/test-app-access.log
       Nginx bind address ipv4:
       Nginx computed bind address ipv4:
       Nginx global bind address ipv4:
       Nginx bind address ipv6:
       Nginx computed bind address ipv6: ::
       Nginx global bind address ipv6: ::
       Nginx client max body size:
       Nginx computed client max body size: 1m
       Nginx global client max body size: 1m
       Nginx disable custom config:
       Nginx computed disable custom config: false
       Nginx global disable custom config: false
       Nginx error log path:
       Nginx computed error log path: /var/log/nginx/test-app-error.log
       Nginx global error log path:   /var/log/nginx/test-app-error.log
       Nginx hsts include subdomains:
       Nginx computed hsts include subdomains: true
       Nginx global hsts include subdomains: true
       Nginx hsts max age:
       Nginx computed hsts max age:   15724800
       Nginx global hsts max age:     15724800
       Nginx hsts preload:
       Nginx computed hsts preload:   false
       Nginx global hsts preload:     false
       Nginx hsts:
       Nginx computed hsts:           true
       Nginx global hsts:             true
       Nginx last visited at:
       Nginx nginx conf sigil path:
       Nginx computed nginx conf sigil path: nginx.conf.sigil
       Nginx global nginx conf sigil path: nginx.conf.sigil
       Nginx proxy buffer size:
       Nginx computed proxy buffer size: 4k
       Nginx global proxy buffer size: 4k
       Nginx proxy buffering:
       Nginx computed proxy buffering: on
       Nginx global proxy buffering:  on
       Nginx proxy buffers:
       Nginx computed proxy buffers:  8 4k
       Nginx global proxy buffers:    8 4k
       Nginx proxy busy buffers size:
       Nginx computed proxy busy buffers size: 8k
       Nginx global proxy busy buffers size: 8k
       Nginx proxy read timeout:
       Nginx computed proxy read timeout: 60s
       Nginx global proxy read timeout: 60s
       Nginx underscore in headers:
       Nginx computed underscore in headers: off
       Nginx global underscore in headers: off
       Nginx x forwarded for value:
       Nginx computed x forwarded for value: $remote_addr
       Nginx global x forwarded for value: $remote_addr
       Nginx x forwarded port value:
       Nginx computed x forwarded port value: $server_port
       Nginx global x forwarded port value: $server_port
       Nginx x forwarded proto value:
       Nginx computed x forwarded proto value: $scheme
       Nginx global x forwarded proto value: $scheme
       Nginx x forwarded ssl:
       Nginx computed x forwarded ssl:
       Nginx global x forwarded ssl:
/var/lib/dokku/plugins/available/openresty-vhosts/command-functions: line 64: fn-openresty-allowed-letsencrypt-domains-func-base64: command not found
=====> test-app openresty information
       Openresty access log format:
       Openresty access log path:     /var/log/nginx/test-app-access.log
       Openresty allowed letsencrypt domains func base64:
       Openresty bind address ipv4:
       Openresty bind address ipv6:   ::
       Openresty client max body size:
       Openresty error log path:      /var/log/nginx/test-app-error.log
       Openresty global hsts:         true
       Openresty computed hsts:       true
       Openresty hsts:
       Openresty hsts include subdomains: true
       Openresty hsts max age:        15724800
       Openresty hsts preload:        false
       Openresty image:               dokku/openresty-docker-proxy:0.7.0
       Openresty letsencrypt email:
       Openresty letsencrypt server:  https://acme-v02.api.letsencrypt.org/directory
       Openresty proxy buffer size:   4k
       Openresty proxy buffering:     on
       Openresty proxy buffers:       8 4k
       Openresty proxy busy buffers size: 8k
       Openresty proxy read timeout:  60s
       Openresty underscore in headers: off
       Openresty x forwarded for value: $remote_addr
       Openresty x forwarded port value: $server_port
       Openresty x forwarded proto value: $scheme
       Openresty x forwarded ssl:
=====> test-app ports information
       Ports map:
       Ports map detected:            http:80:5000
=====> test-app proxy information
       Proxy computed type:           nginx
       Proxy enabled:                 true
       Proxy global type:             nginx
       Proxy type:
panic: runtime error: index out of range [1] with length 1

goroutine 34 [running]:
github.com/dokku/dokku/plugins/ps.getRunningState({0x7ffd5f88625f, 0x8})
    /go/src/github.com/dokku/dokku/plugins/ps/functions.go:80 +0xfd
github.com/dokku/dokku/plugins/ps.reportRunningState({0x7ffd5f88625f?, 0x0?})
    /go/src/github.com/dokku/dokku/plugins/ps/report.go:144 +0x18
github.com/dokku/dokku/plugins/common.CollectReport.func1({0x58f4af, 0x9}, 0x0?)
    /go/src/github.com/dokku/dokku/plugins/common/parallel.go:153 +0x74
created by github.com/dokku/dokku/plugins/common.CollectReport in goroutine 1
    /go/src/github.com/dokku/dokku/plugins/common/parallel.go:151 +0x217

Additional information

I have initialized k3s using sudo dokku scheduler-k3s:initialize and setting it as the default scheduler. I'm only running a single node.

When running git push, the deployment gets stuck at the step Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready. Here is the output of the git push

Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 11 threads
Compressing objects: 100% (13/13), done.
Writing objects: 100% (16/16), 5.36 KiB | 5.36 MiB/s, done.
Total 16 (delta 3), reused 0 (delta 0), pack-reused 0 (from 0)
-----> Cleaning up...
-----> Building test-app from herokuish
-----> Adding BUILD_ENV to build environment...
       BUILD_ENV added successfully
-----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Preparing platform package installation...
remote:        NOTICE: No runtime required in composer.json; requirements
remote:        from dependencies in composer.lock will be used for selection
remote: -----> Installing platform packages...
remote:        - apache (2.4.58)
remote:        - php (8.3.3)
remote:        - composer (2.7.1)
remote:        - nginx (1.24.0)
remote: -----> Installing dependencies...
remote:        Composer version 2.7.1 2024-02-09 15:26:28
remote:        Installing dependencies from lock file
remote:        Verifying lock file contents can be installed on current platform.
remote:        Package operations: 2 installs, 0 updates, 0 removals
remote:          - Installing symfony/polyfill-mbstring (v1.29.0): Extracting archive
remote:          - Installing symfony/var-dumper (v7.0.4): Extracting archive
remote:        Generating optimized autoload files
remote:        2 packages you are using are looking for funding.
remote:        Use the `composer fund` command to find out more!
remote: -----> Preparing runtime environment...
remote:        NOTICE: No Procfile, using 'web: heroku-php-apache2'.
remote: -----> Checking for additional extensions to install...
-----> Discovering process types
       Procfile declares types -> web
-----> Releasing test-app...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
       No release task found, skipping
-----> Deploying test-app via the k3s scheduler...
remote:  !     No autoscaling config found for test-app
 !     Installing test-app
       Getting history for release test-app
       Preparing upgrade for test-app
       Performing update for test-app
       Creating upgraded release for test-app
       Checking 6 resources for changes
       Looks like there are no changes for ServiceAccount "test-app"
       Created a new Secret called "env-test-app.1710766115" in default
       Looks like there are no changes for Service "test-app-web"
       Patch Deployment "test-app-web" in namespace default
       Patch IngressRoute "test-app-web-http-80-5000" in namespace default
       Patch Middleware "test-app-web-redirect-to-https" in namespace default
       Deleting Secret "env-test-app.1710765557" in namespace default...
       Unable to get obj "env-test-app.1710765557", err: secrets "env-test-app.1710765557" not found
       Waiting for release test-app resources (created: 1 updated: 5  deleted: 0)
 !     Beginning wait for 6 resources with timeout of 5m0s
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
       Deployment is not ready: default/test-app-web. 0 out of 1 expected pods are ready
 !     Warning: Upgrade "test-app" failed: client rate limiter Wait returned an error: context deadline exceeded
       Cleanup on fail set, cleaning up 1 resources
       Starting delete for "env-test-app.1710766115" Secret
       Resource cleanup complete
remote:  !     Error deploying: client rate limiter Wait returned an error: context deadline exceeded
To 192.168.1.112:test-app
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to '192.168.1.112:test-app'

At this point, if I look at the pods on the node with k3s kubectl get pods, this is the output:

NAME                           READY   STATUS             RESTARTS   AGE
test-app-web-788798479-l2rpq   0/1     ImagePullBackOff   0          32m

And doing a describe on the app with k3s kubectl describe pod test-app-web-788798479-l2rpq shows that it's not able to pull the image:

Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  33m                    default-scheduler  Successfully assigned default/test-app-web-788798479-l2rpq to ip-192-168-1-112-9635258c68
  Normal   Pulling    31m (x4 over 33m)      kubelet            Pulling image "dokku/test-app:latest"
  Warning  Failed     31m (x4 over 33m)      kubelet            Failed to pull image "dokku/test-app:latest": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/dokku/test-app:latest": failed to resolve reference "docker.io/dokku/test-app:latest": docker.io/dokku/test-app:latest: not found
  Warning  Failed     31m (x4 over 33m)      kubelet            Error: ErrImagePull
  Warning  Failed     31m (x6 over 33m)      kubelet            Error: ImagePullBackOff
  Normal   BackOff    3m20s (x129 over 33m)  kubelet            Back-off pulling image "dokku/test-app:latest"

The image is available on the local docker instance (docker images:)

REPOSITORY                                 TAG             IMAGE ID       CREATED             SIZE
dokku/test-app                             latest          5aa4a6806baf   34 minutes ago      1.13GB

but k3s is trying to pull the image from the docker.io registry

Output of failing commands after running: dokku trace:off

No response

Output of failing commands after running: dokku trace:on

No response

josegonzalez commented 8 months ago

The k3s scheduler requires a registry, full stop. K3s uses containers, which doesn't have access to your local docker images, so attempting to deploy without a configured registry will fail.

pierredup commented 8 months ago

Thanks for clarifying @josegonzalez

I was able to get it to work by setting the following options:

docker login ....
dokku registry:set --global server $server
dokku registry:set --global image-repo-template "$namespace/{{ .AppName }}"
dokku registry:set --global push-on-release true

This wasn't clear in the docs and took some time to figure out all the steps to get it working. I'll see if I can maybe create a PR to update the k3s docs with this information in the following weeks.

Edit: I actually just found this tutorial: https://dokku.com/tutorials/other/deploying-to-k3s/. Might just add a link to this tutorial from the docs page

pierredup commented 8 months ago

Also on a separate note, is there a way to link external services when using k3s? Like MySQL or Postgres? Currently mysql:create creates a container on the local docker instance, which the k3s pod then don't have access to. Is there an alternative way to use the k3s scheduler when creating services through plugins?

josegonzalez commented 8 months ago

The scheduler plugins do not start services on k3s, and I don't have any current plans to enable that sort of functionality (as you can imagine, things get much more complicated when making something highly available).

I recommend looking at the official helm charts/operators for the datastores you're looking at. Bitnami also has some decent helm charts that might be useful to look into.