Skip to main content

Deploying on Azure Kubernetes (AKS)

Deploy the LimePoint Solifi Consumer on Azure Kubernetes Service for enterprise-grade scalability and management.

Prerequisites

  • ✅ AKS cluster created and configured
  • kubectl configured to connect to your AKS cluster
  • ✅ Database service (e.g., Azure SQL) provisioned
  • ✅ Access to LimePoint's Docker Hub
  • ✅ License files and application.yml ready

Step 1: Create Docker Registry Secret

First, create a secret for pulling images from LimePoint's Docker Hub:

kubectl create secret docker-registry regcred \
--docker-server=https://index.docker.io/v1/ \
--docker-username=<username_from_limepoint> \
--docker-password=<password_from_limepoint> \
--docker-email=<your_email>

Step 2: Create ConfigMaps

Since the consumer requires application.yml and license files, create ConfigMaps to store these configurations:

kubectl create configmap consumer-config \
--from-file=application.yml \
--from-file=license.license \
--from-file=sign256.sign

Verify ConfigMap

kubectl describe configmaps consumer-config

Update ConfigMap

To update the ConfigMap without deleting it:

kubectl create configmap consumer-config \
--from-file=license.license \
--from-file=sign256.sign \
--from-file=application.yml \
-o yaml --dry-run=client | kubectl replace -f -

Step 3: Create Deployment

Create a deployment.yml file:

apiVersion: apps/v1
kind: Deployment
metadata:
name: solificonsumer
spec:
replicas: 1
selector:
matchLabels:
app: solificonsumer
template:
metadata:
labels:
app: solificonsumer
spec:
containers:
- name: solificonsumer-container
image: limepoint/solifi-consumer:2.2.4
# imagePullPolicy: Always # Optional. Default is 'IfNotPresent'
env:
- name: spring.config.additional-location
value: "/config/application.yml"
volumeMounts:
- name: config-volume
mountPath: /config
readOnly: true
resources:
requests:
memory: "2Gi"
cpu: "1"
limits:
memory: "4Gi"
cpu: "2"
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 60
periodSeconds: 30
readinessProbe:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
imagePullSecrets:
- name: regcred
volumes:
- name: config-volume
configMap:
name: consumer-config
items:
- key: "application.yml"
path: "application.yml"
- key: "license.license"
path: "license.license"
- key: "sign256.sign"
path: "sign256.sign"

Step 4: Apply the Deployment

kubectl apply -f deployment.yml

This will create a new deployment under Azure Workloads and start the consumer container pods.

Step 5: Verify Deployment

Check Pod Status

kubectl get pods

View Pod Logs

kubectl logs --follow <pod-name> --all-containers

For example:

kubectl logs --follow solificonsumer-7d9f8b6c4d-abc12

Optional: Create a Service

To expose the consumer's health endpoints within the cluster or externally:

apiVersion: v1
kind: Service
metadata:
name: solificonsumer-service
spec:
selector:
app: solificonsumer
ports:
- protocol: TCP
port: 8080
targetPort: 8080
type: ClusterIP # Use LoadBalancer for external access

Apply the service:

kubectl apply -f service.yml

Scaling

Manual Scaling

kubectl scale deployment solificonsumer --replicas=3

Horizontal Pod Autoscaler (HPA)

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: solificonsumer-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: solificonsumer
minReplicas: 1
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70

Using Secrets for Sensitive Data

For better security, store sensitive configuration in Kubernetes Secrets:

kubectl create secret generic solifi-credentials \
--from-literal=db-username=admin \
--from-literal=db-password=yourpassword \
--from-literal=kafka-username=kafkauser \
--from-literal=kafka-password=kafkapass

Reference in your deployment:

env:
- name: SOLIFI_DATABASE_USERNAME
valueFrom:
secretKeyRef:
name: solifi-credentials
key: db-username
- name: SOLIFI_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: solifi-credentials
key: db-password

Troubleshooting

Common Commands

CommandDescription
kubectl get podsList all pods
kubectl describe pod <pod-name>Get detailed pod information
kubectl logs <pod-name>View pod logs
kubectl exec -it <pod-name> -- /bin/bashShell into pod
kubectl delete pod <pod-name>Delete and restart pod

Common Issues

IssueSolution
ImagePullBackOffVerify regcred secret and image name
CrashLoopBackOffCheck logs for startup errors
ConfigMap not mountedVerify ConfigMap exists and paths are correct

References

Next Steps