EKS vs. selbst-installiertes Kubernetes
| Feature | AWS EKS | Selbst-installiert (kubeadm) |
|---|---|---|
| Control Plane | AWS-managed | Eigenverantwortung |
| Upgrades | Click/API | Manuell |
| HA Control Plane | Automatisch | Aufwand |
| Kosten | 0,10 USD/Stunde | EC2-Kosten |
| Integration | AWS-nativ | Eigene Arbeit |
eksctl – EKS CLI Tool
# eksctl installieren
curl --silent --location "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
# Cluster erstellen (einfachste Methode)
eksctl create cluster --name firma-cluster --region eu-central-1 --node-type t3.medium --nodes 3 --nodes-min 2 --nodes-max 5 --managed
# kubectl konfigurieren
aws eks update-kubeconfig --region eu-central-1 --name firma-cluster
# Cluster-Status
kubectl get nodes
kubectl get pods --all-namespaces
Node Groups verwalten
# Neue Managed Node Group
eksctl create nodegroup --cluster firma-cluster --name gpu-nodes --instance-type g4dn.xlarge --nodes 1 --region eu-central-1
# Auto-Scaling konfigurieren
eksctl scale nodegroup --cluster firma-cluster --name managed-ng --nodes 5 --nodes-min 2 --nodes-max 10
Erstes Deployment
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-web
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: nginx-web
template:
metadata:
labels:
app: nginx-web
spec:
containers:
- name: nginx
image: nginx:stable-alpine
ports:
- containerPort: 80
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"
---
apiVersion: v1
kind: Service
metadata:
name: nginx-web
spec:
type: LoadBalancer
selector:
app: nginx-web
ports:
- port: 80
targetPort: 80
kubectl apply -f deployment.yaml
kubectl get svc nginx-web # External IP abwarten
AWS Load Balancer Controller
# IRSA (IAM Roles for Service Accounts) einrichten
eksctl utils associate-iam-oidc-provider --cluster firma-cluster --approve
# LB Controller installieren
helm repo add eks https://aws.github.io/eks-charts
helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=firma-cluster --set serviceAccount.create=true
Cluster autoscaler
# Cluster Autoscaler deployen
kubectl apply -f https://raw.githubusercontent.com/kubernetes/autoscaler/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml
kubectl -n kube-system annotate deployment.apps/cluster-autoscaler cluster-autoscaler.kubernetes.io/safe-to-evict="false"
FAQ
Was kostet ein EKS-Cluster?
EKS Control Plane: 0,10 USD/Stunde (~72 USD/Monat). Dazu kommen EC2-Kosten für Nodes (z. B. 3x t3.medium: ~48 USD/Monat).
Fazit
AWS EKS ist der schnellste Weg zu produktions-reifem Kubernetes ohne Control-Plane-Management. Ideal wenn AWS ohnehin genutzt wird.
AWS EKS und Kubernetes für KMU in Heidelberg, Mannheim und der Rhein-Neckar-Region. Anfragen.