A Kubernetes Deployment declares how an application runs as replicated pods. A minimal manifest sets the image, replica count, selector, pod labels, and image-pull policy. section 13.2.2
apiVersion: apps/v1
kind: Deployment
...
spec:
replicas: 3 #1
...
template:
...
spec:
containers:
- name: testing-bootstrap13b #2
image: my-docker-registry/chapter13b:0.1.0-SNAPSHOT #3
imagePullPolicy: IfNotPresent #4
Use this manifest skeleton to create three identical pods from one Docker image. section 13.2.2
Keep spec.selector.matchLabels and template.metadata.labels aligned. Kubernetes uses that relationship to associate the Deployment with its pods; the label also supports commands such as kubectl get pod -l app=.... section 13.2.2
A Deployment for an Akka cluster commonly configures:
- Node discovery through a service name or the AKKA_CLUSTER_BOOTSTRAP_SERVICE_NAME environment variable. section 13.2.2
- Liveness and readiness HTTP probes on the management port, such as /alive and /ready. section 13.2.2
- A Docker image containing the application and the ports required by Akka Management, Akka Remote, services, and projections. section 15.3.2
Deploying the betting-house application
After preparing the image and Kubernetes service account, create a namespace and apply the deployment: kubectl create ns akka-cluster; kubectl apply -f role.yml -n akka-cluster; kubectl apply -f deployment.yml -n akka-cluster. kubectl get deploy -n akka-cluster can then show three ready pods for my-deployment-name. section 15.3.2









