Kubernetes

K8s ?

Solutions

(Deployment + Service + Ingress)Recommended

# 1. kubectl create namespace myapp # 2. Deployment
kubectl create deployment web --image=myregistry/myapp:v1.0 --replicas=3 -n myapp # 3. Service
kubectl expose deployment web --port=80 --target-port=8080 --type=ClusterIP -n myapp # 4. kubectl rollout status deployment/web -n myapp
kubectl get pods -n myapp # 5. kubectl port-forward svc/web 8080:80 -n myapp

, Deployment Pod, Service provides, port-forward.

:, and

YAML

# YAML kubectl create deployment web --image=myapp:v1.0 --replicas=3 --dry-run=client -o yaml > deployment.yaml # kubectl apply -f deployment.yaml -n myapp
kubectl apply -f service.yaml -n myapp # kubectl get all -n myapp

, YAML Git, GitOps.

:, and

resources.requests and limits
tag
(livenessProbe/readinessProbe)

Related Commands