--- title: DaemonSet # 簡報的名稱 tags: K8s # 簡報的標籤 --- # DaemonSet > [name=李俊毅] > [time=Wed, Feb 5, 2020 1:04 PM] --- ## Agenda * 介紹 * 範例 --- ## 介紹 DaemonSet,可縮寫為ds,管理無狀態應用,無需設定Pod要放在哪個Node上,ds會自動配置在每個Node上,Pod Name為無序命名,命名規則為 Pod Name- 加上 UID --- ## 範例 ---- hello-world.yaml ``` apiVersion: apps/v1 kind: DaemonSet metadata: labels: app.kubernetes.io/name: load-balancer-example name: hello-world spec: selector: matchLabels: app.kubernetes.io/name: load-balancer-example template: metadata: labels: app.kubernetes.io/name: load-balancer-example spec: containers: - image: gcr.io/google-samples/node-hello:1.0 name: hello-world ports: - containerPort: 8080 ``` ---- 查看ds ---- 查看Pod
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up