Installing Porch

Installing prerequisites, the porchctl CLI and an instance of Porch on a K8s cluster.

Prerequisites

Before porch and its CLI can be installed a few prerequisites are required to be present on the system. These are as follows:

  1. git (v2.51.2)
  2. Docker - either Docker Desktop or Docker Engine (v28.1.1)
  3. kubectl - make sure that kubectl context configured with your cluster (v1.34.2)
  4. kpt (v1.0.0-beta.59)
  5. The go programming language (v1.25.3)

Installing the porchctl CLI

The porchctl CLI can be obtained through the following means:

Download the latest porchctl binary

curl -LO "https://github.com/nephio-project/porch/releases/download/v1.5.4/porchctl_1.5.4_linux_amd64.tar.gz"
curl -LO "https://github.com/nephio-project/porch/releases/download/v1.5.4/porchctl_1.5.4_linux_arm64.tar.gz"
curl -LO "https://github.com/nephio-project/porch/releases/download/v1.5.4/porchctl_1.5.4_darwin_amd64.tar.gz"
curl -LO "https://github.com/nephio-project/porch/releases/download/v1.5.4/porchctl_1.5.4_darwin_arm64.tar.gz"

Install the porchctl binary

This extracts the tar file containting the binary executable and installs it into the root binary directory of the machine.

tar -xzf porchctl_1.5.4_linux_amd64.tar.gz | sudo install -o root -g root -m 0755 porchctl /usr/local/bin/
tar -xzf porchctl_1.5.4_linux_amd64.tar.gz
chmod +x ./porchctl
mkdir -p ~/.local/bin
mv ./porchctl ~/.local/bin/porchctl
# and then append (or prepend) ~/.local/bin to $PATH

You can test that the CLI has been installed correctly by doing porchctl version in your terminal and you should be prompted with a printout that looks similar to this.

Version: 1.5.4
Git commit: cddc13bdcd569141142e2b632f09eb7a3e4988c9 (dirty)

Enable porchctl autocompletion (optional)

Create the completions directory (if it doesn’t already exist):

mkdir -p ~/.local/share/bash-completion/completions

Generate and install the completion script:

porchctl completion bash > ~/.local/share/bash-completion/completions/porchctl

Reload your shell:

exec bash

Test that the auto-completion works with the following command and pressing the auto-complete key usually <TAB> twice.

porchctl

If auto-completion is working as correctly this should return a similar output to the one below

completion  (Generate the autocompletion script for the specified shell)
help        (Help about any command)
repo        (Manage package repositories.)
rpkg        (Manage packages.)
version     (Print the version number of porchctl)

Deploying Porch on a cluster

Create a new directory for the kpt package and path inside of it

mkdir porch-1.5.4 && cd porch-1.5.4

Download the latest Porch kpt package blueprint

curl -LO "https://github.com/nephio-project/porch/releases/download/v1.5.4/porch_blueprint.tar.gz"

Extract the Porch kpt package contents

tar -xzf porch_blueprint.tar.gz

Initialize and apply the Porch kpt package

kpt live init && kpt live apply

You can check that porch is up and running by doing

kubectl get all -n porch-system

A healthy porch install should look as such

NAME                                   READY   STATUS    RESTARTS   AGE
pod/function-runner-567ddc76d-7k8sj    1/1     Running   0          4m3s
pod/function-runner-567ddc76d-x75lv    1/1     Running   0          4m3s
pod/porch-controllers-d8dfccb4-8lc6j   1/1     Running   0          4m3s
pod/porch-server-7dc5d7cd4f-smhf5      1/1     Running   0          4m3s

NAME                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)            AGE
service/api               ClusterIP   10.96.108.221   <none>        443/TCP,8443/TCP   4m3s
service/function-runner   ClusterIP   10.96.237.108   <none>        9445/TCP           4m3s

NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/function-runner     2/2     2            2           4m3s
deployment.apps/porch-controllers   1/1     1            1           4m3s
deployment.apps/porch-server        1/1     1            1           4m3s

NAME                                         DESIRED   CURRENT   READY   AGE
replicaset.apps/function-runner-567ddc76d    2         2         2       4m3s
replicaset.apps/porch-controllers-d8dfccb4   1         1         1       4m3s
replicaset.apps/porch-server-7dc5d7cd4f      1         1         1       4m3s