Registry / database / cdk8s-redis

cdk8s-redis

JSON →
library0.1.913jsnpmunverified

cdk8s-redis provides Redis constructs for defining Kubernetes Redis clusters using cdk8s. Version 0.1.913 is current with weekly releases. It supports primary-replica configurations with customizable replica counts and exposes DNS endpoints (primaryHost, replicaHost). Key differentiator: declarative Kubernetes-native Redis definitions via cdk8s, built on constructs and cdk8s libraries, TypeScript-first with full type definitions. Requires cdk8s ^2.68.91 and constructs ^10.3.0 as peer dependencies.

npm install cdk8s-redis
INSTALL
IMPORT
SIG · CDK8S-REDIS
C
cdk8s-redis
databasejavascriptv0.1.913
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Redis
import { Redis } from 'cdk8s-redis'
const Redis = require('cdk8s-redis').Redis
ESM-only; use named import. CommonJS require works but discouraged.
RedisProps
import { RedisProps } from 'cdk8s-redis'
import { RedisProps } from 'cdk8s-redis/dist/types'
TypeScript type is exported directly; no need to import from internal paths.
default export
import Redis from 'cdk8s-redis'
import { default } from 'cdk8s-redis'
Library does not have a default export; only named exports exist.

Defines a Redis cluster with 3 replicas using cdk8s and deploys it to Kubernetes.

import { App, Chart, ChartProps } from 'cdk8s'; import { Redis } from 'cdk8s-redis'; const app = new App(); const chart = new Chart(app, 'redis-chart', { namespace: 'default' }); new Redis(chart, 'my-redis', { replicas: 3, }); app.synth();
Debug
Known issues
breakingcdk8s-redis 0.1.x requires cdk8s ^2.68.91 and constructs ^10.3.0
fix
Ensure project uses compatible versions of cdk8s and constructs.
affects: >=0.1.0
deprecatedUse of 'require' is deprecated; library is ESM-only
fix
Use ES import syntax: import { Redis } from 'cdk8s-redis'.
affects: >=0.1.0
gotchaRedisProps interface may not be exported in older versions
fix
Declare props inline or upgrade to latest version.
affects: <0.1.900
Errors
Common errors & fixes
Cannot find module 'cdk8s-redis' or its corresponding type declarations
Missing peer dependencies (cdk8s, constructs) or mismatched versions
fix
Install required peer deps: npm install cdk8s constructs
TypeError: Class extends value undefined is not a constructor or null
Incorrect import of Redis class as default instead of named export
fix
Use named import: import { Redis } from 'cdk8s-redis'
Property 'primaryHost' does not exist on type 'Redis'
Accessing property before Redis construct is initialized or synth() is called
fix
Access primaryHost after app.synth() or within construct lifecycle
Upgrade
Version history
0.1.913latest on npm
Audit
Dependencies
cdk8srequiredpeer dependency for Kubernetes resource definitions
constructsrequiredpeer dependency for construct base class
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
cdk8s-redis — npm install cdk8s-redis · libregistry