Hi
I have added a RabbitMQ container directly in Rancher using the workload UI, which should create the associated DNS records (Service Discovery)
I add rabbit, with the name of “queue” in the “data” namespace. expose a ClusterIP port of 5672 (and 15672)
now i try to connect to it via my service (which i deploy in another namespace, called basket). i set the connection to be “queue.data”, this does not work.
I have also deployed the application in the same basket app into the data namespace, and set the connection to queue. this does not work either.
the error from the app is
RabbitMQ Connect Failed: Broker unreachable: guest@queue:5672/
i have deployed the rabbit as a stateful and scale-able container, no dice.
here is the rabbit setup (i know that the 15672 port is not required)
apiVersion: apps/v1beta2
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "2"
field.cattle.io/creatorId: user-sgwmb
field.cattle.io/publicEndpoints: "null"
creationTimestamp: "2019-09-05T01:17:25Z"
generation: 4
labels:
cattle.io/creator: norman
workload.user.cattle.io/workloadselector: deployment-data-queue
name: queue
namespace: data
resourceVersion: "1925181"
selfLink: /apis/apps/v1beta2/namespaces/data/deployments/queue
uid: eb77ff99-cf7a-11e9-b2cf-de1c4876d034
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
workload.user.cattle.io/workloadselector: deployment-data-queue
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
cattle.io/timestamp: "2019-09-05T01:23:14Z"
field.cattle.io/ports: '[[{"containerPort":15672,"dnsName":"queue","kind":"ClusterIP","name":"15672tcp2","protocol":"TCP"},{"containerPort":5672,"dnsName":"queue","kind":"ClusterIP","name":"5672tcp2","protocol":"TCP"}]]'
creationTimestamp: null
labels:
workload.user.cattle.io/workloadselector: deployment-data-queue
spec:
containers:
- image: redis:5.0.5-alpine
imagePullPolicy: Always
name: queue
ports:
- containerPort: 15672
name: 15672tcp2
protocol: TCP
- containerPort: 5672
name: 5672tcp2
protocol: TCP
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities: {}
privileged: false
procMount: Default
readOnlyRootFilesystem: false
runAsNonRoot: false
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
tty: true
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 1
conditions:
- lastTransitionTime: "2019-09-05T01:17:31Z"
lastUpdateTime: "2019-09-05T01:17:31Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2019-09-05T01:17:25Z"
lastUpdateTime: "2019-09-05T01:23:18Z"
message: ReplicaSet "queue-7f49dfdfcb" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 4
readyReplicas: 1
replicas: 1
updatedReplicas: 1
and the service setup is
apiVersion: v1
kind: Service
metadata:
annotations:
field.cattle.io/ipAddresses: "null"
field.cattle.io/targetDnsRecordIds: "null"
field.cattle.io/targetWorkloadIds: '["deployment:data:queue"]'
workload.cattle.io/targetWorkloadIdNoop: "true"
workload.cattle.io/workloadPortBased: "true"
creationTimestamp: "2019-09-05T01:17:25Z"
labels:
cattle.io/creator: norman
name: queue
namespace: data
ownerReferences:
- apiVersion: apps/v1beta2
controller: true
kind: deployment
name: queue
uid: eb77ff99-cf7a-11e9-b2cf-de1c4876d034
resourceVersion: "1925746"
selfLink: /api/v1/namespaces/data/services/queue
uid: eb8420f1-cf7a-11e9-b2cf-de1c4876d034
spec:
clusterIP: 10.XXXXXXXX
ports:
- name: 15672tcp2
port: 15672
protocol: TCP
targetPort: 15672
- name: 5672tcp2
port: 5672
protocol: TCP
targetPort: 5672
publishNotReadyAddresses: true
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
what am i missing? i would like to understand how to set this up in the UI.