apiVersion: apps/v1 kind: Deployment metadata: name: nocodelytics-nats spec: replicas: 1 selector: matchLabels: ms: nocodelytics-nats template: metadata: labels: ms: nocodelytics-nats spec: imagePullSecrets: - name: regcred containers: - name: nocodelytics-nats imagePullPolicy: Always image: nats command: - "nats-server" - "--cluster_name" - "nocodelytics-nats-cluster" - "-js" - "--user" - "nats" - "--pass" - "hello" readinessProbe: tcpSocket: port: 4222 initialDelaySeconds: 5 periodSeconds: 10 livenessProbe: tcpSocket: port: 4222 initialDelaySeconds: 10 failureThreshold: 5 periodSeconds: 10 terminationGracePeriodSeconds: 60 resources: requests: memory: "256Mi" cpu: "50m" limits: memory: "512Mi" cpu: "200m" volumes: - name: config-volume configMap: name: nats-server-config nodeSelector: kubernetes.io/arch: arm64 kubernetes.io/hostname: primary-b tolerations: - key: "arch" operator: "Equal" value: "arm64" effect: "NoSchedule" --- apiVersion: v1 kind: Service metadata: name: nocodelytics-nats spec: type: NodePort selector: ms: nocodelytics-nats ports: - port: 4222 targetPort: 4222 nodePort: 30040