K8s Lab 把当前仓库文档整理成一个可阅读的网页站点

Repository Reading Site

deployment.yaml

manifests/02-apply-chain/deployment.yaml

Text Assetmanifests/02-apply-chain/deployment.yaml725 B2026年4月9日 17:36查看原始内容
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-deploy
  namespace: learn-k8s
  labels:
    app: hello-deploy
    lesson: apply-chain
spec:
  replicas: 2
  selector:
    matchLabels:
      app: hello-deploy
  template:
    metadata:
      labels:
        app: hello-deploy
        lesson: apply-chain
    spec:
      containers:
      - name: hello-web
        image: nginx:1.27.0
        ports:
        - containerPort: 80
        readinessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 2
          periodSeconds: 5
        livenessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 5
          periodSeconds: 10