nats-io/nats-operator

If AdvertiseExternalIP is true on Configfile, startup fails

csh995426531 opened this issue · 0 comments

my deployment.yaml content:

apiVersion: nats.io/v1alpha2
kind: NatsCluster
metadata:
  name: nats-cluster
  namespace: nats
spec:
  size: 3
  version: "2.1.8"
  pod:
    enableClientsHostPort: true
    advertiseExternalIP: true

  template:
    spec:
      serviceAccountName: "nats-server"

Run the command "kubectl apply -f operator-prereqs.yaml", Pod "nats-cluster-1" status is Error.

This is command "kubectl describe po nats-cluster-1 -n nats" output content:

Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  40s                default-scheduler  Successfully assigned nats/nats-cluster-1 to node1
  Normal   Pulled     22s (x3 over 39s)  kubelet, node1     Container image "connecteverything/nats-boot-config:0.5.2" already present on machine
  Normal   Created    22s (x3 over 38s)  kubelet, node1     Created container bootconfig
  Normal   Started    21s (x3 over 38s)  kubelet, node1     Started container bootconfig
  Warning  BackOff    10s (x4 over 37s)  kubelet, node1     Back-off restarting failed container

Command "kubectl logs nats-cluster-1 -n nats" output content:

Error from server (BadRequest): container "nats" in pod "nats-cluster-1" is waiting to start: PodInitializing