kubectl apply creates or updates Kubernetes resources from declarative YAML configuration files. It turns deployment manifests into running objects such as deployments, pods, and services. section 6.8.5 section 6.8.9
Deploy a local microservice
From the directory containing the manifest, run `kubectl apply -f scripts/deploy.yaml`. Successful output reports created resources, such as `deployment.apps/video-streaming created` and `service/video-streaming created`. section 6.8.5
Validate and iterate after applying a manifest:
- Run `kubectl get pods` to confirm the pod reaches `Running` status. section 6.8.5
- Run `kubectl get deployments` and `kubectl get services` to check readiness and exposed ports. section 6.8.5
- After rebuilding an updated Docker image with a new version number, run kubectl apply again to deploy the change. section 6.8.6
- Use an infrastructure script to apply stable MongoDB and RabbitMQ configurations once at cluster setup. section 10.10.3
cd chapter-10/scripts/local-kub ./deploy.sh
A local deployment script combines Docker image builds with kubectl apply calls for multiple microservices and their YAML configurations. section 10.8.2





