https://garden.io logo
#🤖|ask-kapa
what's the equivalent way to deploy a nats pod if in docker-compose.yaml it looks like:
# 🤖|ask-kapa
p

proud-river-11384

09/15/2023, 2:39 PM
@microscopic-river-74022 what's the equivalent way to deploy a nats pod if in docker-compose.yaml it looks like: natsjs: image: nats:latest container_name: natsjs ports: - "4222:4222" command: ["-js"]
m

microscopic-river-74022

09/15/2023, 2:39 PM
Please stand by @proud-river-11384 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- To deploy a NATS pod using Garden, you would create a Garden configuration file similar to the ones described in the documentation. Here's an example based on the information you provided:
Copy code
yaml
kind: Deploy
apiVersion: garden.io/v1
name: natsjs
description: NATS server with JetStream enabled
type: container
spec:
  image: nats:latest
  ports:
    - name: nats
      containerPort: 4222
  args: ["-js"]
This configuration file specifies the same image, port, and command as your Docker Compose file. The
name
field is set to
natsjs
, the
image
field is set to
nats:latest
, and the
containerPort
field is set to
4222
. The
args
field is used to pass the
["-js"]
command to the container. Please note that this is a simplified example and you might need to adjust it based on your specific needs and environment. For more information, you can refer to the Garden documentation (). Also, please be aware of a known issue with Garden where it fails on validation when a port name used in a Helm chart is a stringified number (e.g. "5000"). This issue is discussed in this GitHub issue (). In this case, the port name is "nats", so it should not be affected by this issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------