0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

node-poolを指定してdeploymentを作成メモ

Posted at

背景

deployment作成する時にどのnode-poolで稼働するかを指定したい。
yamlファイルで指定する方法。

やり方

node-poolの一覧取得

kubectl get nodes

yamlで指定

nodeSelectorcloud.google.com/gke-nodepool の項目にnode-pool名を指定する。


apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: sample-01
  name: sample-01
  namespace: default
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: sample-01
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: sample-01
    spec:
      containers:
      - image: gcr.io/xxx/batch_server:20.08.19
        imagePullPolicy: IfNotPresent
        name: sample-sha256-1
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      nodeSelector:
        cloud.google.com/gke-nodepool: batch-pool # <- これ
~略~

参照

Node上へのPodのスケジューリング

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?