Created
February 3, 2023 14:28
-
-
Save harsh4870/4557561c9b2558998fdddaa540fc05e2 to your computer and use it in GitHub Desktop.
minikube my gist to install rabbitmq and nginx ingress contoller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
labels: | |
component: rabbitmq | |
name: rabbitmq | |
spec: | |
serviceName: rabbitmq | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: rabbitmq | |
template: | |
metadata: | |
labels: | |
app: taskQueue | |
component: rabbitmq | |
spec: | |
containers: | |
- image: rabbitmq:3-management-alpine | |
name: rabbitmq | |
ports: | |
- name: http | |
protocol: TCP | |
containerPort: 15672 | |
- name: amqp | |
protocol: TCP | |
containerPort: 5672 | |
- name: epmd | |
containerPort: 4369 | |
resources: | |
limits: | |
cpu: 100m | |
imagePullPolicy: Always | |
#volumes: | |
# - name: config-volume | |
# configMap: | |
# name: rabbitmq-config | |
# items: | |
# - key: rabbitmq.conf | |
# path: rabbitmq.conf | |
# - key: enabled_plugins | |
# path: enabled_plugins | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: rabbitmq-management | |
labels: | |
component: rabbitmq | |
spec: | |
#type: LoadBalancer | |
ports: | |
- port: 8888 | |
targetPort: 15672 | |
name: http | |
selector: | |
component: rabbitmq | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: rabbitmq-service | |
labels: | |
component: rabbitmq | |
spec: | |
ports: | |
- port: 5672 | |
selector: | |
app: taskQueue | |
component: rabbitmq | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: ing-rabbitmq-amqp | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: rabbitmq-service | |
port: | |
number: 5672 | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: tcp-services | |
namespace: ingress-nginx | |
data: | |
5672: "default/rabbitmq-service:5672" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add the Nginx ingress controller with :
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.0/deploy/static/provider/baremetal/deploy.yaml