U1.54 Ubuntu Quick Start (QS): RabbitMQ Kubernetes test bench on premises - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki
We start with
- we continue to work with the Kubernetes cluster prepared in the article
RabbitMQ cluster name and Namespace
- RabbitMQ cluster nameRabbitMQ cluster name = rbmq-tst-clstr
- RabbitMQ cluster nameRabbitMQ cluster Namespace = rbmq-tst-clstr-nmspc
Namespace Note:
- selfsigned-issuer was automatically created in the rabbitmq-system namespace
Pod Security Policies Note
Production Example
Create a Namespace
kubectl apply -f- <<EOF
apiVersion: v1
kind: Namespace
metadata:
name: rbmq-tst-clstr-nmspc
EOF
Create a Cluster
- Create a Cluster with disabled:
- tls
- topology-allowed-namespaces
- for u2004s01
kubectl apply -f- <<EOF
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: rbmq-tst-clstr
namespace: rbmq-tst-clstr-nmspc
spec:
replicas: 2
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- u2004s02
- u2004s03
persistence:
storageClassName: second-local-path
storage: 1Gi
resources:
requests:
cpu: 100m
memory: 1Gi
limits:
cpu: 100m
memory: 1Gi
EOF
yury@u2004s01:~$ kubectl get pods -n rbmq-tst-clstr-nmspc
NAME READY STATUS RESTARTS AGE
rbmq-tst-clstr-server-0 1/1 Running 0 6m55s
rbmq-tst-clstr-server-1 1/1 Running 0 6m54s
Management UI
yury@u2004s01:~$ kubectl get rabbitmqcluster rbmq-tst-clstr -n rbmq-tst-clstr-nmspc -ojsonpath='{.status.defaultUser.secretReference.name}'
rbmq-tst-clstr-default-user
yury@u2004s01:~$ kubectl get secret rbmq-tst-clstr-default-user -n rbmq-tst-clstr-nmspc -o jsonpath="{.data.username}" | base64 --decode
default_user_MPPZecVUxkvaiR3HFbZ
yury@u2004s01:~$ kubectl get secret rbmq-tst-clstr-default-user -n rbmq-tst-clstr-nmspc -o jsonpath="{.data.password}" | base64 --decode
Y10E5a5Vbbdx4TmGsh97pj6ZjK3Wu3Nc
yury@u2004s01:~$ kubectl port-forward --address 0.0.0.0 svc/rbmq-tst-clstr -n rbmq-tst-clstr-nmspc 15672
- Now
http://192.168.100.61:15672/
-link is available for
- user name: default_user_MPPZecVUxkvaiR3HFbZ
- password: Y10E5a5Vbbdx4TmGsh97pj6ZjK3Wu3Nc