Message Aid

Kubernetes

Create Registry Secret

kubectl create secret docker-registry ma-reg-cred \
  --docker-server=550846617829.dkr.ecr.us-east-1.amazonaws.com \
  --docker-username=AWS \
  --docker-password=$(aws ecr get-login-password) \
  --namespace=$YOUR_NAMESPACE

Verify Installation

  1. Docker image should be up and running
  2. curl -XGET http://localhost:5002/health should return 200
  3. The log statement like Received Kernel Heartbeat prod/us should be seen in the logs

Sample Manifest.yaml

apiVersion: v1
kind: Service
metadata:
  name: message-aid-agent-service
  namespace: $YOUR_NAMESPACE
spec:
  type: NodePort
  ports:
    - port: 5002
  selector:
    app: message-aid-agent-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: message-aid-agent-deployment
  namespace: $YOUR_NAMESPACE
  labels:
    app: message-aid-agent-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: message-aid-agent-app
  template:
    metadata:
      labels:
        app: message-aid-agent-app
    spec:
      containers:
        - name: message-aid-agent-container
          image: 550846617829.dkr.ecr.us-east-1.amazonaws.com/prod-us-agent:latest
          imagePullPolicy: Always
          ports:
            - name: web
              containerPort: 5002
      imagePullSecrets:
        - name: ma-reg-cred