tkn pac bootstrap
Bootstrap Pipelines-as-Code installation and GitHub App configuration on your Kubernetes cluster.Synopsis
Description
Thebootstrap command helps you get started by:
- Checking if Pipelines-as-Code is installed
- Installing or upgrading PAC if needed
- Detecting OpenShift Routes or Kubernetes Ingress
- Creating a GitHub App for authentication
- Configuring webhook forwarding (if needed)
Subcommands
tkn pac bootstrap
Full bootstrap process including installation and GitHub App creation.tkn pac bootstrap github-app
Create only the GitHub App, skipping the installation step. Useful when PAC is already installed.Supported Providers
- GitHub (public github.com)
- GitHub Enterprise (self-hosted GitHub)
Installation Detection
The command automatically:- Checks for existing Pipelines-as-Code installation
- Detects the installation namespace (
pipelines-as-codeoropenshift-pipelines) - Offers to install the latest stable or nightly release if not found
Route/Ingress Detection
OpenShift:- Automatically detects OpenShift Routes
- Uses the Route URL as the webhook endpoint
- Attempts to detect Tekton Dashboard Ingress
- Prompts to use detected URL or enter custom URL
Webhook Forwarding (gosmee)
For clusters not accessible from the internet, bootstrap can install gosmee, a webhook forwarder:- Creates a public URL at
https://hook.pipelinesascode.com - Forwards webhooks to your cluster
- Automatically configured in GitHub App
Usage Examples
Flags
Installation Flags
Skip Pipelines-as-Code installation
Force PAC installation even if already installed
Install the nightly/development build instead of stable release
GitHub App Flags
Skip creating GitHub application
Override existing GitHub App configuration
GitHub Enterprise hostname or API URL (e.g.,
github.company.com)Deprecated: Use
--github-hostname insteadCustom name for the GitHub Application
Homepage URL for the GitHub Application
Target a GitHub organization instead of user account
Network Flags
Public URL for the PAC controller (overrides auto-detection)
Force gosmee installation even on OpenShift
gosmee forwarder URL
Full URL to Tekton Dashboard
Local webserver port for GitHub App creation flow
General Flags
Disable colored output
Interactive Flow
When runningtkn pac bootstrap interactively, you’ll be prompted for:
- Installation confirmation (if PAC not found)
- GitHub Enterprise setup (if applicable)
- Route/Ingress URL (if not auto-detected)
- gosmee installation (if cluster not internet-accessible)
- GitHub App details (name, organization)
Output Example
GitHub App Creation Process
- Local webserver starts on port 8080
- Browser opens to GitHub App creation page
- App manifest submitted with required permissions
- Secret created with App credentials in cluster
- Configuration stored in
pipelines-as-codenamespace
GitHub App Permissions
The created GitHub App will have:-
Repository permissions:
- Contents: Read & Write
- Issues: Read & Write
- Metadata: Read
- Pull Requests: Read & Write
- Checks: Read & Write
- Commit statuses: Read & Write
-
Organization permissions:
- Members: Read
- Administration: Read
-
Events subscription:
- Push
- Pull Request
- Issue Comment
GitHub Enterprise Setup
For GitHub Enterprise installations:- Detect it’s not public GitHub
- Set provider type to
github-enterprise-app - Use the correct API endpoints
- Create app on your GitHub Enterprise instance
Troubleshooting
PAC Already Installed
If PAC is already installed:--force-configure to reconfigure:
Route Not Detected
If auto-detection fails:Cluster Not Internet Accessible
For clusters behind firewalls:Browser Doesn’t Open
If the browser doesn’t open automatically:- Check the terminal output for the URL
- Manually open:
http://localhost:8080 - Complete the GitHub App creation flow
Port Already in Use
If port 8080 is busy:Files and Secrets Created
Secret: pipelines-as-code-secret
Created in the PAC installation namespace with:github-application-id- GitHub App IDgithub-private-key- Private key for App authenticationwebhook.secret- Webhook secret
ConfigMap: pipelines-as-code-info
Stores installation metadata:- PAC version
- Installation namespace
- Controller URL
Related Commands
tkn pac create repo- Create Repository CRD after bootstraptkn pac generate- Generate PipelineRun templatestkn pac webhook- Manage webhook configuration