阿里云 k8s pod指定节点运行的配置方法

阿里云 k8s pod指定节点运行的配置方法

https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/schedule-pods-to-specific-nodes#title-uqk-wt4-49r

首先上面的url是阿里云官方的教程,以下是调度过程中发生的一些插曲

spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: miyuan-dispatchmoment-deploy
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: miyuan-dispatchmoment-deploy
    spec:
      containers:
        - image: >-
            registry-vpc.cn-hangzhou.aliyuncs.com/yunfaquan-prod/miyuan-dispatchmoment-deploy:20211009_b
          imagePullPolicy: Always
          name: miyuan-dispatchmoment-deploy
          ports:
            - containerPort: 7898
              protocol: TCP
          resources:
            limits:
              memory: 8Gi
            requests:
              memory: 2Gi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: alihzregistry-secret
      nodeName: cn-hangzhou.192.168.148.34  --------改这里

总结一下如何制定pod去某个节点运行。。修改yaml。在spec.template.spec.nodeName。增加这个节点属性。值时具体节点的名字

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇