{"id":44546,"library":"cdk8s-redis","title":"cdk8s-redis","description":"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.","status":"active","version":"0.1.913","language":"javascript","source_language":"en","source_url":"https://github.com/cdk8s-team/cdk8s-redis","tags":["javascript","cache","cdk8s","containers","database","kubernetes","redis","typescript"],"install":[{"cmd":"npm install cdk8s-redis","lang":"bash","label":"npm"},{"cmd":"yarn add cdk8s-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add cdk8s-redis","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for Kubernetes resource definitions","package":"cdk8s","optional":false},{"reason":"peer dependency for construct base class","package":"constructs","optional":false}],"imports":[{"note":"ESM-only; use named import. CommonJS require works but discouraged.","wrong":"const Redis = require('cdk8s-redis').Redis","symbol":"Redis","correct":"import { Redis } from 'cdk8s-redis'"},{"note":"TypeScript type is exported directly; no need to import from internal paths.","wrong":"import { RedisProps } from 'cdk8s-redis/dist/types'","symbol":"RedisProps","correct":"import { RedisProps } from 'cdk8s-redis'"},{"note":"Library does not have a default export; only named exports exist.","wrong":"import { default } from 'cdk8s-redis'","symbol":"default export","correct":"import Redis from 'cdk8s-redis'"}],"quickstart":{"code":"import { App, Chart, ChartProps } from 'cdk8s';\nimport { Redis } from 'cdk8s-redis';\n\nconst app = new App();\nconst chart = new Chart(app, 'redis-chart', { namespace: 'default' });\n\nnew Redis(chart, 'my-redis', {\n  replicas: 3,\n});\n\napp.synth();","lang":"typescript","description":"Defines a Redis cluster with 3 replicas using cdk8s and deploys it to Kubernetes."},"warnings":[{"fix":"Ensure project uses compatible versions of cdk8s and constructs.","message":"cdk8s-redis 0.1.x requires cdk8s ^2.68.91 and constructs ^10.3.0","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use ES import syntax: import { Redis } from 'cdk8s-redis'.","message":"Use of 'require' is deprecated; library is ESM-only","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Declare props inline or upgrade to latest version.","message":"RedisProps interface may not be exported in older versions","severity":"gotcha","affected_versions":"<0.1.900"}],"env_vars":null,"search_vec":"'0.1.913':18 '10.3.0':68 '2.68.91':65 'built':50 'cach':73 'cdk8s':2,5,16,49,54,64,74 'cdk8s-redis':1,4 'cluster':14 'configur':29 'construct':9,52,67 'contain':75 'count':33 'current':20 'customiz':31 'databas':76 'declar':42 'defin':11 'definit':47,62 'depend':71 'differenti':41 'dns':36 'endpoint':37 'expos':35 'first':58 'full':60 'javascript':72 'key':40 'kubernet':12,44,77 'kubernetes-n':43 'librari':55 'nativ':45 'peer':70 'primari':27 'primary-replica':26 'primaryhost':38 'provid':7 'redi':3,6,8,13,46,78 'releas':23 'replica':28,32 'replicahost':39 'requir':63 'support':25 'type':61 'typescript':57,79 'typescript-first':56 'use':15 'version':17 'via':48 'week':22","created_at":"2026-06-07T12:50:40.108737+00:00","updated_at":"2026-06-07T12:50:40.108737+00:00","problems":[{"fix":"Install required peer deps: npm install cdk8s constructs","cause":"Missing peer dependencies (cdk8s, constructs) or mismatched versions","error":"Cannot find module 'cdk8s-redis' or its corresponding type declarations"},{"fix":"Use named import: import { Redis } from 'cdk8s-redis'","cause":"Incorrect import of Redis class as default instead of named export","error":"TypeError: Class extends value undefined is not a constructor or null"},{"fix":"Access primaryHost after app.synth() or within construct lifecycle","cause":"Accessing property before Redis construct is initialized or synth() is called","error":"Property 'primaryHost' does not exist on type 'Redis'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/cdk8s-team/cdk8s-redis#readme","github":"https://github.com/cdk8s-team/cdk8s-redis","docs":null,"changelog":null,"pypi":null,"npm":"cdk8s-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}