Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.11 KB

File metadata and controls

49 lines (33 loc) · 1.11 KB

Local Development Guide

This guide explains how to test local code changes in your kind cluster.

1. Build Local Image

The images are built in cf-k8s-releases. For building the image with modified source code, please refer to th local-development-guide.

2. Load Image into kind

Make the locally built image available to your kind cluster:

kind load docker-image <image>:latest --name cfk8s

Example:

kind load docker-image gorouter:latest --name cfk8s

3. Use the Image

Update the deployment or daemonset to use your local image:

kubectl edit deployment <component-name>

Example:

kubectl edit deployment gorouter

Modify the image and pull policy:

spec:
  template:
    spec:
      containers:
      - name: gorouter
        image: gorouter:latest
        imagePullPolicy: IfNotPresent  # Important: prevents pulling from registry

After save and exit the relevant pods will be restarted automatically.