< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Set CI Nodes for Dependency Cache

Building applications often requires pulling different dependencies. Issues such as long pulling times and unstable networks may occur during the pulling process, leading to build failures. To provide a more reliable and stable environment, you can configure nodes or node groups specifically for continuous integration (CI) and speed up the build process by using cache.

This document demonstrates how to set CI nodes so that KubeSphere schedules pipeline tasks to these nodes.

Prerequisites

You should have the Cluster Management permission on the KubeSphere platform.

Label CI Nodes

  1. Log in to the KubeSphere web console with an account that has the Cluster Management permission.

  2. Click Cluster Management and enter a cluster.

  3. In the left navigation pane, select Nodes > Cluster Nodes to view the existing nodes in the current cluster.

  4. Select a node from the list to run CI tasks. Click the node name to go to its detail page, and click More > Edit Labels.

  5. In the dialog that appears, enter ci as the value after the key node-role.kubernetes.io/worker, and click OK.

Add Taints to CI Nodes

Pipelines generally determine whether to schedule tasks to a node based on node affinity. If you want to dedicate a node to CI tasks, i.e., not allow other workloads to be scheduled to that node, you can add taints to that node.

  1. Click More > Edit Taints.

  2. Click Add, enter the key node.kubernetes.io/ci without specifying a value. Select Prevent scheduling, Prevent scheduling if possible, or Prevent scheduling and evict existing pods as needed.

  3. Click OK. KubeSphere will schedule tasks based on the taints you set.

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.