The Paladin Operator is a Kubernetes operator designed to manage Paladin nodes within a Kubernetes cluster. It automates the deployment, configuration, and management of Paladin instances, providing a seamless experience for operators and developers.
- Prerequisites
- Getting Started
- One-Click Installation with Gradle
- Manual Installation Steps
- Step 1: Build the Paladin and Operator Images
- Step 2: Start the Kind Cluster
- Step 3: Load the Images into the Kind Cluster
- Step 4: Install Helm CRDs
- Step 5: Install the Operator Using Helm
- Step 6: Verify the Operator is Running
- Step 7: Create a Functional Paladin Node
- Step 8: Verify the Nodes are Running
- Cleanup
- Development
- Additional Information
- Support and Contribution
- License
- Contact
Before you begin, ensure you have the following installed:
- Go version v1.22+
- Docker version 17.03+
- Gradle version 6.0+
- kubectl version v1.11.3+
- Kind (Kubernetes in Docker) installed
- Helm version v3+
- GNU Make
For convenience, you can run the entire setup with a single Gradle command:
gradle deploy
This command performs all the necessary steps to deploy the Paladin Operator and create a functional Paladin node:
- Builds both the Paladin and Operator Docker images.
- Starts the Kind cluster.
- Loads the images into the cluster.
- Installs Helm CRDs.
- Installs the operator using Helm.
- Verifies the operator is running in the
paladin
namespace. - Creates the Paladin nodes (Besu Node and Paladin Node).
Note: This is the quickest way to get everything up and running.
Cleanup
gradle clean
This will not delete the cluster. Delete the cluster by running
make kind-delete
Alternatively, you can follow these steps to build and deploy the Paladin Operator and Paladin nodes in a local Kubernetes cluster using Kind.
Navigate to the parent directory of the project (where the build.gradle
file is located) and run:
gradle docker
This command will:
- Build the Paladin Docker image.
- Build the Operator Docker image.
Note: The docker
task in the Gradle build script orchestrates the building of both images.
Create a local Kubernetes cluster using Kind:
make kind-start
This command will create a Kind cluster named paladin
(as specified in the Makefile
).
Load the Paladin and Operator images into the Kind cluster:
make kind-promote
This command loads the necessary Docker images into the Kind cluster so they can be used by Kubernetes deployments.
Install the Custom Resource Definitions (CRDs) required by the operator:
make install-crds
This uses Helm to install the CRDs defined in the operator's Helm chart.
Deploy the Paladin Operator to the cluster:
make helm-install
This command will:
- Install the operator into the
paladin
namespace. - Create the namespace if it doesn't exist.
- Set the operator's namespace appropriately.
Ensure the operator is running correctly in the paladin
namespace:
kubectl get pods -n paladin
You should see output similar to:
NAME READY STATUS RESTARTS AGE
paladin-operator-xxxxxxxxxx-xxxxx 1/1 Running 0 XXm
Now that the operator is running, you can create the Paladin nodes.
Create the nodes (Besu Node and Paladin Node):
make create-node
This command will:
- Create a Besu Genesis ConfigMap.
- Create a Besu Node instance and related resources.
- Create a Paladin Node instance and related resources.
Check the status of the nodes:
kubectl get pods -n paladin
You should see output similar to:
NAME READY STATUS RESTARTS AGE
besu-node-xxxxxxxxxx-xxxxx 1/1 Running 0 XXm
paladin-node-xxxxxxxxxx-xxxxx 1/1 Running 0 XXm
This confirms that the Paladin and Besu nodes are successfully deployed and running.
To remove the operator and clean up all resources from your cluster, run:
gradle clean
This command will:
- Delete all Paladin instances.
- Uninstall the operator Helm chart.
- Uninstall the CRDs.
- Clean up any build artifacts from your local environment.
Note: The clean
task in the Gradle build script depends on the cleanCluster
task, which invokes make clean
to perform the cleanup.
To build the operator binary:
make build
To run the operator locally (outside the cluster):
make run
This is useful for development and debugging purposes.
Run unit tests:
make test
Run end-to-end tests:
make test-e2e
Run linters to ensure code quality:
make lint
Automatically fix lint issues:
make lint-fix
- Operator SDK Documentation: Operator SDK
- Kubernetes Documentation: Kubernetes
- Kind Documentation: Kind
- Helm Documentation: Helm
If you encounter any issues or have suggestions, please:
- Open an Issue: Submit a detailed issue on the project's issue tracker.
- Submit a Pull Request: Fork the repository, make your changes, and submit a pull request for review.
Contributions are welcome!
This project is licensed under the Apache License 2.0.
For questions or support, please contact the maintainers of this project.