AKS 21- All type AKS Manifest Files Overview

You typically need the following Kubernetes objects:

  1. Deployment
  2. Service
  3. Ingress (optional)
  4. ConfigMap
  5. Secret
  6. HorizontalPodAutoscaler (HPA)
  7. Namespace (optional)

1. Deployment (deployment.yaml)

Defines how your app is deployed (replicas, containers, image, etc.).

Why use: Ensures consistent rollout of your app with scaling and updates.

2. Service (service.yaml)

Exposes your app internally or externally.

Why use: Enables communication between pods or external access.

3. Ingress (ingress.yaml) (optional)

Handles routing and TLS termination.

Why use: Provides HTTP routing, TLS, and domain-based access.

This matches all paths that start with /. pathType: Prefix means any request starting with / (like /, /home, /about) will match.

The request is forwarded to the welcome-service on port 80.

4. ConfigMap (configmap.yaml)

Stores non-sensitive configuration.

Why use: Externalize environment variables for flexibility.

5. Secret (secret.yaml)

Stores sensitive data like passwords or API keys.

Why use: Securely manage sensitive configuration.

6. HorizontalPodAutoscaler (hpa.yaml)

Auto-scales pods based on CPU/memory.

Why use: Automatically adjusts resources based on load.

7. Namespace (namespace.yaml) (optional)

Isolates resources within the cluster.

Why use: Organizes and scopes resources for better management.

Summary of Differences & Usage

ObjectPurposeKey Difference
DeploymentManages app lifecycleControls replicas, updates
ServiceExposes appInternal/external access
IngressRoutes HTTP trafficDomain-based routing
ConfigMapStores configNon-sensitive data
SecretStores secretsSensitive data (base64)
HPAAuto-scales podsBased on metrics
NamespaceLogical groupingIsolation & organization

Leave a Reply

Your email address will not be published. Required fields are marked *