Questions tagged [nodeselector]

14 questions
6
votes
1 answer

How to add nodeSelector to Deployment yaml file?

In the pods definition, we add the nodeSelector as a child of spec. But I'm not sure how to add this in deployment yaml file are we supposed to add it in the template's spec- apiVersion: apps/v1 kind: Deployment metadata: name: first-deployment …
AYUSHI NIGAM
  • 97
  • 1
  • 5
4
votes
1 answer

EKS nodeSelector results in pending pod

I am encountering problems when using nodeSelector in my Kubernetes manifest. I have a nodegroup in EKS with the label eks.amazonaws.com/nodegroup=dev-nodegroup. This node has a name with the corresponding ip, as usual in AWS. If I set the nodeName…
Gonzalo Donoso
  • 657
  • 1
  • 6
  • 17
2
votes
2 answers

Assign Gitlab Runner daemon's pod and the jobs's pods to two separate node groups in Kubernetes when using Kubernetes executor

We're using Gitlab Runner with Kubernetes executor and we were thinking about what I think is currently not possible. We want to assign the Gitlab Runner daemon's pod to a specific node group's worker with instance type X and the jobs' pods to a…
2
votes
1 answer

Including extra flags in the apiserver manifest file in kubernetes v1.21.0 does not seem to have any effect

I am trying to add the two flags below to apiserver in the /etc/kubernetes/manifests/kube-apiserver.yaml file: spec: containers: - command: - kube-apiserver - --enable-admission-plugins=NodeRestriction,PodNodeSelector -…
Francisco
  • 21
  • 2
2
votes
1 answer

deployment not in nodeSelector kubernetes

I have a cluster having 2 nodes and one of the nodes is labelled as "SS" for node selector. I have three services and one service should be deployed in node selector node(which is happening properly) and the other two services should be deployed in…
rakeshh92
  • 885
  • 2
  • 10
  • 18
1
vote
2 answers

GKE jenkins kubernetes plugin node selector not working

I am using Jenkins to deploy my Docker images to GKE by using the kubernetes plugin version 1.30.3. It works fine so far. But now I am trying to choose a defined node pool in GKE by adding a node selector but it doesn't work for me. This is the…
1
vote
1 answer

How can I run a cronjob on multiple nodes sequentially in kubernetes?

I have two different types of worker nodes, ones that do data preparation and nodes that do machine learning. I want to run a Cronjob that runs one process on a preparation node, then (only when finished) a second process on an ML node. How can I do…
GDev
  • 428
  • 1
  • 5
  • 14
1
vote
2 answers

Kubernetes node affinity - Assigning a pod to a specific node?

The k8s node affinity documentation explains how to deploy a pod to a specific node by first tagging the node with a label and using nodeSelector to pick the node. However, I have a use case where I have 40-50 deployments in a cluster and I want…
zeroweb
  • 2,612
  • 4
  • 22
  • 34
0
votes
1 answer

NodeSelector for Job - use it only if NodeSelector exists

I have a Job Object which shall use a Node Selector to only use Nodes, which have a GPU under the hood. I know to to set it (it gets converted from a string in a python program). job = f""" apiVersion: batch/v1 kind: Job .... …
Data Mastery
  • 1,555
  • 4
  • 18
  • 60
0
votes
1 answer

Kubernetes apply nodeSelector via command

Is there a way to apply a nodeSelector via command? (like kubectl apply) It would be nice if it is applicable on running deployments or namespaces, otherwise applying to running pods is also fine. Any tips are appreciated
Nur1
  • 418
  • 4
  • 11
0
votes
1 answer

Is there any method to set nodeselector for pod using golang api

Basically need a way to set nodeselector for Pod using GoLang API Pod.Spec.NodeSelector["failure-domain.beta.kubernetes.io/zone"] = zone is giving out error
kr_devops
  • 117
  • 3
  • 14
0
votes
2 answers

Is there a one line kubectl command to add the nodeSelector in the pod yaml?

I was wondering if there was a one line kubectl command to add the nodeSelector in the pod yaml? (I have already attached a label to the node) I am trying to automate this and hence I want to avoid manually downloading the yaml file and adding the…
Contraboy
  • 99
  • 1
  • 1
  • 10
-1
votes
1 answer

Not valid Selector/Error: No node found for selector

I am trying use my code to click on a button using puppeteer but for some reason the button is always unable to be found (Not valid Selector/Error: No node found for selector) or the waitFor expires, this is my code: const puppeteer =…
4DAM
  • 23
  • 3
-2
votes
1 answer

Regex in node selector

I have 4 k8's nodes, let's say apple, ball, cat, dell nodes. If I want to assign a pod(the kind used is deployment/statefullset) to a selective node then I could use node_selector for it. I'm going to implement vertical autoscaling of nodes. If…