AWS Cloud Developer: Kubernetes for production Flashcards
Kubernetes configuration for reducing cost
reduce number of replicas
reduce and tune resources
Kubernetes configuration for security
Configure who has access to the Kubernetes pods and services.
Secure traffic for least-privilege
What are some additional considerations for production ready applications
Restrict Access
Follow properties of least-privilege to secure our application.
Scale
Be able to handle the number and size of user requests.
Availability
Ensure that the application is responsive and able to be used when needed.
Load Testing
Load testing is a common way to simulate a large number of requests to our application. By doing so, we are essentially stress-testing it to preview when it will fail. This helps us set a baseline understanding of the limits of our application.
Reverse Proxy
A single interface that forwards requests on behalf of the client and appears to the client as the origin of the responses.
Useful for abstracting multiple microservices to appear as a single resource.
API Gateway
A form of a reverse proxy that serves as an abstraction of the interface to other services.
Ingress
Inbound web traffic
Egress
Outbound web traffic
Self-healing
Kubernetes deployments can be set up to recover from failure.
Health checks - an HTTP endpoint that must return a 200 response for a healthy status. Kubernetes will periodically ping this endpoint.
Replicas - Kubernetes will attempt to maintain the number of desired replicas. If a pod is terminated, it will automatically recreate the pod.
Horizontal Pod Autoscaler
Horizontal Pod Autoscaler
A deployment feature that allows additional pods to be created when a CPU usage threshold is reached.
CMD: Create HPA
kubectl autoscale deployment –cpu-percent= –min=
–max=
CMD: View HPA
kubectl get hpa
Liveness Probe
A monitoring activity that occurs at scheduled intervals to ping a health check API endpoint to validate that the application is in a healthy state.
Resilience
The property of an application to handle and recover from failures.
Why do we choose to use horizontal scaling over vertical scaling with our microservices?
Horizontal scaling is more cost-effective?