Version R2 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.

Minimal Environment install for development

Minimal Environment install for development

The following environment install works on a MacBook Pro M1 or via SSH to Ubuntu 22.04 to get the nephio-operators running in vscode talking to a local kind cluster running in Docker. Note that depending on what part of Nephio you are working on, you may wish to install less or more of the components below. It should work on other environments with appropriate tweaking.

Install Docker, kind, and kpt packages

This script automates steps 3 to 9 below.

#!/usr/bin/env bash

cat <<EOF | kind create cluster --config=-
kind: Cluster
  - role: control-plane
    image: kindest/node:v1.29.0
      - containerPort: 3000
        hostPort: 3000
pushd "$(mktemp -d -t "kpt-pkg-XXX")" >/dev/null || exit
for pkg in "distros/sandbox/gitea" "/nephio/core/porch" "nephio/core/configsync" "nephio/optional/resource-backend"; do
    kpt pkg get "${pkg}@main" "${pkg##*/}"
    kpt live init "${pkg##*/}"
    kpt live apply "${pkg##*/}"

kpt pkg get nephio-operator
find nephio-operator/crd/bases/*.yaml -exec kubectl apply -f {} \;

popd >/dev/null || exit

Installation steps:

  1. Install Docker using the appropriate method for your system.

  2. Install kind using the appropriate method for your system (homebrew on mac)

  3. Install kpt cli using the appropriate method for your system (e.g. homebrew on mac)

  4. Create the management cluster

kind create cluster -n mgmt
  1. Install gitea
kpt pkg get gitea
kpt live init gitea
kpt live apply gitea
  1. Make gitea visible on host machine
kubectl port-forward -n gitea svc/gitea 3000:3000
  1. Install Porch
kpt pkg get porch
kpt live init porch
kpt live apply porch
  1. Install configsync
kpt pkg get configsync
kpt live init configsync
kpt live apply configsync
  1. Install the resource backend
kpt pkg get resource-backend
kpt live init resource-backend
kpt live apply resource-backend
  1. Load the Nephio CRDs
kpt pkg get nephio-operator
ls nephio-operator/crd/bases/*.yaml | xargs -n1 kubectl apply -f

Connect to Gitea on your browser

Connecting to Gitea allows you to see the actions that Nephio takes on Gitea.

  1. Port forward the Gitea port to your localhost
kubectl port-forward -n gitea svc/gitea 3000:3000
  1. Browse to the Gitea web client at http://localhost:3000 and log on.

VS Code Configuration

Set up a launch configuration in VS Code launch.json similar to the configuration below:

    "version": "0.2.0",
    "configurations": [
            "name": "Launch Nephio Controller Manager",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/operators/nephio-controller-manager",
            "args": [
            "env": {
				"GIT_URL": "http://localhost:3000",
                "GIT_NAMESPACE": "gitea"

You can now launch the Nephio operators in VS Code using the launch configuration above. You can specify a list of the reconcilers you wish to run in the --reconcilers argument value or * to run all the reconcilers.