Git Product home page Git Product logo

Comments (4)

iGeeky avatar iGeeky commented on May 26, 2024

I'm sorry, but I haven't tested running wolf on k8s yet, since I haven't used k8s before.
But as I see above, there may be a problem with the command (based on docker-compose experience), try changing the command to something like this:
command: ["npm", "run", "start"]

from wolf.

Caelebs avatar Caelebs commented on May 26, 2024

I tried it but the problem still exists, It seems that there is nothing wrong with the configuration file, I will try to find other ways.

Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  53s                default-scheduler  Successfully assigned wolf/wolf-server-tj7ogt-78b454dcf9-n9pnj to node06
  Warning  BackOff    23s (x2 over 50s)  kubelet, node06    Back-off restarting failed container
  Normal   Pulled     10s (x4 over 52s)  kubelet, node06    Container image "igeeky/wolf-server" already present on machine
  Normal   Created    10s (x4 over 52s)  kubelet, node06    Created container wolf-server
  Warning  Failed     10s (x4 over 51s)  kubelet, node06    Error: failed to start container "wolf-server": Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"[\\\"npm\\\", \\\"run\\\", \\\"start\\\"]\": executable file not found in $PATH": unknown

@iGeeky

from wolf.

iGeeky avatar iGeeky commented on May 26, 2024

You can refer to the following documentation:

https://unofficial-kubernetes.readthedocs.io/en/latest/concepts/configuration/container-command-args/

Using command with args. like this:

 command: ["npm"]
 args: ["run", "start"]

from wolf.

Caelebs avatar Caelebs commented on May 26, 2024

Perfect solution! I deployed it like this, the service can be started.

spec:
      containers:
        - name: container-06s18q
          image: igeeky/wolf-server
          command:
            - npm
          args:
            - run
            - start
          ports:
            - name: http-10080
              containerPort: 10080
              protocol: TCP
          env:
            - name: RBAC_ROOT_PASSWORD
              value: wolf-123456
            - name: RBAC_TOKEN_KEY
              value: f40215a5f25cbb6d36df07629aaf1172240fe48d
            - name: WOLF_CRYPT_KEY
              value: fbd4962351924792cb5e5b131435cd30b24e3570
            - name: RBAC_SQL_URL
              value: 'postgres://root:123456@wolf-database:5432/wolf'
            - name: CLIENT_CHANGE_PWD
              value: 'no'

Thanks for your help
@iGeeky

from wolf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.