Hi! I am trying to install polygon-cdk on Kubernetes instead of Docker. I am just curious what zkValidium services can be scaled in terms of adding more container replicas? I understand that databases are stateful applications and should be carefully managed. But what about other components like Sequencer, Aggregator, Synchronizer, Bridge Service, RPC, Explorer etc? How much are these components stateless? The idea is to get more load balanced and high available configuration. Is it good too with Kubernetes? Please suggest me a good environment for the deployment.
Setting up a Polygon-CDK (Chain Development Kit) deployment environment is essential for developers building custom Layer 2 or app-specific blockchains on the Polygon ecosystem. The CDK offers a modular framework powered by the Polygon SDK, designed to simplify the deployment of ZK-powered or EVM-compatible chains.
To begin, ensure your development environment includes the following prerequisites:
- Node.js and Yarn/NPM for package management
- Docker and Docker Compose for running local nodes and infrastructure
- A modern Linux-based OS or WSL2 if you’re on Windows
Clone the Polygon-CDK GitHub repository and install dependencies. The CDK provides default configurations and scripts to deploy a testnet or development chain. Use the provided setup to spin up nodes, sequencers, and optionally, bridging infrastructure.
Before deployment, customize your chain settings such as chain ID, token name, block time, and network parameters in the configuration files. Developers commonly use Hardhat or Foundry for smart contract testing and deployment within this environment.
The deployment process includes launching key services like the Rollup Node, Prover, RPC server, and Data Availability layer. These components interact to enable zero-knowledge proof generation and efficient state updates.
Monitor logs closely for errors during the setup, and ensure that Docker containers are communicating properly. The Polygon-CDK also integrates with cloud providers for production-ready environments.
For ongoing development, consider integrating tools like Tenderly, The Graph, or Etherscan-like explorers.