A Kubernetes Deployment defines an application declaratively and represents the workload that Kubernetes runs. In a Quarkus project, the Kubernetes extension generates this resource alongside a Service and, optionally, a ServiceMonitor. section 11.3.3
Use the Quarkus integration to generate and apply a Deployment:
- Add the Kubernetes extension to the application project. section 11.3.3
- Build the application to generate YAML and JSON manifests under target/kubernetes. section 11.3.3
- Inspect the generated Deployment, including its container image and image-pull policy. section 11.3.3
- Apply the YAML with kubectl, then inspect running pods or forward a pod port for local access. section 11.3.3
Inventory service
Building the Inventory service produces a Deployment using the image quay.io/quarkus-in-action/inventory-service:1.0.0. Applying the generated manifest creates the inventory-service Deployment; kubectl get pods confirms its pod is running. section 11.3.3
Listing 11.11 Simplified version of the generated kubernetes.yml
apiVersion: v1
kind: Service
...
spec:
ports:
- name: grpc
port: 9000
protocol: TCP
targetPort: 9000
- name: http
port: 80
protocol: TCP
targetPort: 8083
---
apiVersion: apps/v1
kind: Deployment
...
spec:
...
spec:
containers:
- env:
...
image: quay.io/quarkus-in-action/inventory-service:1.0.0
imagePullPolicy: Always
Inspect the simplified generated manifest to see how a Kubernetes Deployment declares the application image and container settings. section 11.3.3









