When reading a Git project repository containing Kubernetes manifests, follow this sequence to understand the project structure and deployment process efficiently:
1. Start with the README file
• File: README.md
• Why: It often provides an overview of the project, installation steps, and explanations of key components.
2. Check the Deployment Configuration
• Look for directories like deploy/, k8s/, manifests/, or helm/.
Identify the main deployment files:
• deployment.yaml (Defines how the application runs in Kubernetes)
• service.yaml (Handles internal and external access) - Controls how the app is accessed inside the cluster.
• ingress.yaml (Manages external HTTP/HTTPS access, if used. e.g., via a domain).
• configmap.yaml (Stores app settings that are not secret.) and secret.yaml (Stores sensitive data like passwords in a safe way.)
3. Review the Namespace and RBAC Settings
• namespace.yaml (Defines the Kubernetes namespace for the resources)
• role.yaml, rolebinding.yaml, clusterrole.yaml (If RBAC is in use)
4. Check Configuration and Environment Variables
• configmap.yaml (Non-sensitive environment variables)
• secret.yaml (Sensitive data like API keys, stored in a base64-encoded format)
5. Look at Persistent Storage (if applicable)
• persistentvolume.yaml (Defines storage provisioned outside the cluster)
• persistentvolumeclaim.yaml (Requests storage for the application)
6. Check Helm Charts (if applicable)
• If the repository uses Helm, inspect the charts/ directory and values.yaml for configuration settings.
7. Review CI/CD Pipelines (if applicable)
• Look for .github/workflows/, .gitlab-ci.yml, or similar CI/CD files to see how deployments are automated.
Final Step: Follow the Deployment Flow
• Try to visualize how these files work together in deploying the application.
• Check the kubectl apply -f commands in the documentation to understand the expected order of execution.