@bluedynamics/cdk8s-plone 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +47 -28
- package/API.md +28 -3
- package/lib/config/plone-vinyl-backend-response.vcl +25 -0
- package/lib/config/plone-vinyl-recv-routing-volto.vcl +21 -0
- package/lib/config/plone-vinyl-recv.vcl +18 -0
- package/{examples/volto → lib}/config/varnish.tpl.vcl +1 -1
- package/lib/httpcache.js +1 -1
- package/lib/imports/vinyl.bluedynamics.eu.d.ts +398 -66
- package/lib/imports/vinyl.bluedynamics.eu.js +169 -17
- package/lib/plone.js +1 -1
- package/lib/vinylcache.d.ts +21 -0
- package/lib/vinylcache.js +21 -2
- package/package.json +3 -2
- package/.claude/claude.md +0 -39
- package/.claude/settings.local.json +0 -31
- package/CLAUDE.md +0 -352
- package/docs/superpowers/plans/2026-06-12-configurable-service-spec.md +0 -608
- package/docs/superpowers/specs/2026-06-12-configurable-service-spec-design.md +0 -192
- package/documentation/Makefile +0 -357
- package/documentation/README.md +0 -284
- package/documentation/mx.ini +0 -3
- package/documentation/sources/_static/logo.svg +0 -79
- package/documentation/sources/conf.py +0 -145
- package/documentation/sources/explanation/architecture.md +0 -336
- package/documentation/sources/explanation/cdk8s-workflow.md +0 -66
- package/documentation/sources/explanation/features.md +0 -374
- package/documentation/sources/explanation/index.md +0 -34
- package/documentation/sources/how-to/backup-and-restore.md +0 -107
- package/documentation/sources/how-to/configure-env-and-secrets.md +0 -184
- package/documentation/sources/how-to/configure-ingress-tls.md +0 -108
- package/documentation/sources/how-to/configure-security-context.md +0 -143
- package/documentation/sources/how-to/deploy-blicca.md +0 -334
- package/documentation/sources/how-to/deploy-volto.md +0 -324
- package/documentation/sources/how-to/deploy-with-httpcache.md +0 -224
- package/documentation/sources/how-to/deploy-with-vinyl-cache.md +0 -273
- package/documentation/sources/how-to/enable-prometheus-monitoring.md +0 -122
- package/documentation/sources/how-to/index.md +0 -85
- package/documentation/sources/how-to/scale-and-high-availability.md +0 -122
- package/documentation/sources/how-to/schedule-pods.md +0 -145
- package/documentation/sources/how-to/setup-prerequisites.md +0 -363
- package/documentation/sources/how-to/troubleshooting.md +0 -113
- package/documentation/sources/how-to/upgrade-and-rollout.md +0 -140
- package/documentation/sources/index.md +0 -109
- package/documentation/sources/reference/api/index.md +0 -40
- package/documentation/sources/reference/configuration-options.md +0 -352
- package/documentation/sources/reference/index.md +0 -41
- package/documentation/sources/tutorials/01-quick-start.md +0 -165
- package/documentation/sources/tutorials/index.md +0 -53
- package/examples/blicca/.env.example +0 -20
- package/examples/blicca/README.md +0 -339
- package/examples/blicca/__snapshots__/main.test.ts.snap +0 -1035
- package/examples/blicca/cdk8s.yaml +0 -6
- package/examples/blicca/config/varnish.tpl.vcl +0 -217
- package/examples/blicca/ingress.ts +0 -217
- package/examples/blicca/jest.config.js +0 -11
- package/examples/blicca/main.test.ts +0 -18
- package/examples/blicca/main.ts +0 -101
- package/examples/blicca/package.json +0 -36
- package/examples/blicca/postgres.cloudnativepg.ts +0 -63
- package/examples/blicca/postgres.plain.ts +0 -115
- package/examples/blicca/tsconfig.json +0 -33
- package/examples/volto/.env.example +0 -21
- package/examples/volto/README.md +0 -292
- package/examples/volto/__snapshots__/main.test.ts.snap +0 -1206
- package/examples/volto/cdk8s.yaml +0 -6
- package/examples/volto/ingress.ts +0 -229
- package/examples/volto/jest.config.js +0 -11
- package/examples/volto/main.test.ts +0 -18
- package/examples/volto/main.ts +0 -105
- package/examples/volto/package.json +0 -36
- package/examples/volto/postgres.cloudnativepg.ts +0 -63
- package/examples/volto/postgres.plain.ts +0 -115
- package/examples/volto/tsconfig.json +0 -33
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
myst:
|
|
3
|
-
html_meta:
|
|
4
|
-
"description": "Constrain Plone backend, frontend, and Varnish pods to specific Kubernetes nodes using nodeSelector and tolerations."
|
|
5
|
-
"property=og:description": "Constrain Plone backend, frontend, and Varnish pods to specific Kubernetes nodes using nodeSelector and tolerations."
|
|
6
|
-
"property=og:title": "Schedule pods to specific nodes"
|
|
7
|
-
"keywords": "Plone, cdk8s, Kubernetes, nodeSelector, tolerations, scheduling, taints"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Schedule pods to specific nodes
|
|
11
|
-
|
|
12
|
-
<div class="page-metadata">
|
|
13
|
-
<div class="metadata-content">
|
|
14
|
-
<p><strong>Type</strong>: How-To (Task-oriented)</p>
|
|
15
|
-
<p><strong>Difficulty</strong>: Intermediate</p>
|
|
16
|
-
<p><strong>Time</strong>: 10 minutes</p>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
This guide shows you how to control where Plone backend, frontend, and Varnish pods run.
|
|
21
|
-
Use `nodeSelector` to require specific node labels and tolerations to schedule onto tainted nodes.
|
|
22
|
-
|
|
23
|
-
## Prerequisites
|
|
24
|
-
|
|
25
|
-
- A working Plone deployment using `cdk8s-plone`.
|
|
26
|
-
- Cluster labels and taints already configured on the target nodes.
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
kubectl get nodes --show-labels
|
|
30
|
-
kubectl describe node <node> | grep Taints
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Constrain pods to labeled nodes
|
|
34
|
-
|
|
35
|
-
Add `nodeSelector` to `backend`, `frontend`, or both.
|
|
36
|
-
Every label in the selector must match for a node to be considered.
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { Plone, PloneVariant } from '@bluedynamics/cdk8s-plone';
|
|
40
|
-
|
|
41
|
-
new Plone(chart, 'plone', {
|
|
42
|
-
variant: PloneVariant.VOLTO,
|
|
43
|
-
backend: {
|
|
44
|
-
image: 'plone/plone-backend:6.1.3',
|
|
45
|
-
nodeSelector: {
|
|
46
|
-
'topology.kubernetes.io/region': 'fsn1',
|
|
47
|
-
'workload': 'plone',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
frontend: {
|
|
51
|
-
image: 'plone/plone-frontend:16.0.0',
|
|
52
|
-
nodeSelector: {
|
|
53
|
-
'workload': 'plone',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Schedule the cache onto the same nodes
|
|
60
|
-
|
|
61
|
-
`PloneVinylCache` exposes the same `nodeSelector` option.
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
import { PloneVinylCache } from '@bluedynamics/cdk8s-plone';
|
|
65
|
-
|
|
66
|
-
new PloneVinylCache(chart, 'cache', {
|
|
67
|
-
plone: ploneInstance,
|
|
68
|
-
nodeSelector: {
|
|
69
|
-
'workload': 'plone',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
`PloneHttpcache` schedules through the underlying mittwald Helm chart and does not expose a `nodeSelector` option directly.
|
|
75
|
-
Use cluster-level affinity rules or taints when you need to constrain those pods.
|
|
76
|
-
|
|
77
|
-
## Tolerate tainted nodes
|
|
78
|
-
|
|
79
|
-
When nodes carry a taint, pods must declare a matching toleration before the scheduler places them there.
|
|
80
|
-
Both cache constructs accept a `tolerations` list.
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
new PloneHttpcache(chart, 'cache', {
|
|
84
|
-
plone: ploneInstance,
|
|
85
|
-
tolerations: [
|
|
86
|
-
{
|
|
87
|
-
key: 'workload',
|
|
88
|
-
operator: 'Equal',
|
|
89
|
-
value: 'plone',
|
|
90
|
-
effect: 'NoSchedule',
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
});
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
```typescript
|
|
97
|
-
new PloneVinylCache(chart, 'cache', {
|
|
98
|
-
plone: ploneInstance,
|
|
99
|
-
tolerations: [
|
|
100
|
-
{
|
|
101
|
-
key: 'workload',
|
|
102
|
-
operator: 'Equal',
|
|
103
|
-
value: 'plone',
|
|
104
|
-
effect: 'NoSchedule',
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
});
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
`operator: 'Exists'` matches any value for that key.
|
|
111
|
-
Omit `effect` to tolerate every effect for the matching taint.
|
|
112
|
-
|
|
113
|
-
## Combine selector and toleration
|
|
114
|
-
|
|
115
|
-
Selectors and tolerations work together: the selector narrows the candidate nodes, and the toleration unblocks the scheduler when those nodes are tainted.
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
new PloneVinylCache(chart, 'cache', {
|
|
119
|
-
plone: ploneInstance,
|
|
120
|
-
nodeSelector: {
|
|
121
|
-
'workload': 'plone',
|
|
122
|
-
},
|
|
123
|
-
tolerations: [
|
|
124
|
-
{ key: 'workload', operator: 'Equal', value: 'plone', effect: 'NoSchedule' },
|
|
125
|
-
],
|
|
126
|
-
});
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Verify the rollout
|
|
130
|
-
|
|
131
|
-
```shell
|
|
132
|
-
cdk8s synth
|
|
133
|
-
kubectl apply -f dist/
|
|
134
|
-
|
|
135
|
-
# Confirm pods landed on the expected nodes
|
|
136
|
-
kubectl get pods -n <namespace> -o wide
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
A pod stuck in `Pending` with `0/N nodes are available: ... node(s) had untolerated taint` means a taint is not tolerated.
|
|
140
|
-
`0/N nodes are available: ... node(s) didn't match Pod's node affinity/selector` means the `nodeSelector` does not match any node.
|
|
141
|
-
|
|
142
|
-
## See also
|
|
143
|
-
|
|
144
|
-
- {doc}`/reference/configuration-options` — `nodeSelector`, `HttpcacheToleration`, `VinylCacheToleration` reference.
|
|
145
|
-
- [Kubernetes: Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) — Selectors, affinity, and taints.
|
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
myst:
|
|
3
|
-
html_meta:
|
|
4
|
-
"description": "Install kubectl, Node.js or Python, CDK8S, and prepare a Kubernetes cluster to deploy Plone with cdk8s-plone."
|
|
5
|
-
"property=og:description": "Install kubectl, Node.js or Python, CDK8S, and prepare a Kubernetes cluster to deploy Plone with cdk8s-plone."
|
|
6
|
-
"property=og:title": "Setup prerequisites"
|
|
7
|
-
"keywords": "Plone, cdk8s, Kubernetes, kubectl, Node.js, Python, prerequisites"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Setup prerequisites
|
|
11
|
-
|
|
12
|
-
Prepare your environment for deploying Plone with cdk8s-plone.
|
|
13
|
-
|
|
14
|
-
## Required tools
|
|
15
|
-
|
|
16
|
-
### kubectl
|
|
17
|
-
|
|
18
|
-
Command-line tool for deploying and managing Kubernetes resources.
|
|
19
|
-
|
|
20
|
-
**Installation:**
|
|
21
|
-
- [Install kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
|
|
22
|
-
|
|
23
|
-
**Verify installation:**
|
|
24
|
-
```shell
|
|
25
|
-
kubectl version --client
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Configure cluster access:**
|
|
29
|
-
```shell
|
|
30
|
-
# Verify you can connect to your cluster
|
|
31
|
-
kubectl cluster-info
|
|
32
|
-
kubectl get nodes
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Node.js (for TypeScript/JavaScript)
|
|
36
|
-
|
|
37
|
-
Required for TypeScript/JavaScript development.
|
|
38
|
-
|
|
39
|
-
**Minimum version:** 16+
|
|
40
|
-
**Recommended:** LTS version
|
|
41
|
-
|
|
42
|
-
**Installation:**
|
|
43
|
-
- [Install Node.js](https://nodejs.org/)
|
|
44
|
-
- Or use [nvm](https://github.com/nvm-sh/nvm):
|
|
45
|
-
```shell
|
|
46
|
-
nvm install --lts
|
|
47
|
-
nvm use --lts
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Verify installation:**
|
|
51
|
-
```shell
|
|
52
|
-
node --version
|
|
53
|
-
npm --version
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Python (for Python development)
|
|
57
|
-
|
|
58
|
-
Required for Python development.
|
|
59
|
-
|
|
60
|
-
**Minimum version:** Python 3.8+
|
|
61
|
-
**Recommended:** Python 3.11+
|
|
62
|
-
|
|
63
|
-
**Installation:**
|
|
64
|
-
- [Install Python](https://www.python.org/downloads/)
|
|
65
|
-
|
|
66
|
-
**Verify installation:**
|
|
67
|
-
```shell
|
|
68
|
-
python --version
|
|
69
|
-
pip --version
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### CDK8S CLI
|
|
73
|
-
|
|
74
|
-
The CDK8S command-line tool for project initialization and synthesis.
|
|
75
|
-
|
|
76
|
-
**Installation:**
|
|
77
|
-
```shell
|
|
78
|
-
npm install -g cdk8s-cli
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Verify installation:**
|
|
82
|
-
```shell
|
|
83
|
-
cdk8s --version
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Optional tools
|
|
87
|
-
|
|
88
|
-
### Helm
|
|
89
|
-
|
|
90
|
-
Required only if you want to generate Helm charts instead of raw Kubernetes manifests.
|
|
91
|
-
|
|
92
|
-
**Installation:**
|
|
93
|
-
- [Install Helm](https://helm.sh/docs/intro/install/)
|
|
94
|
-
|
|
95
|
-
**Verify installation:**
|
|
96
|
-
```shell
|
|
97
|
-
helm version
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### k9s
|
|
101
|
-
|
|
102
|
-
Terminal-based UI for managing Kubernetes clusters (recommended for development).
|
|
103
|
-
|
|
104
|
-
**Installation:**
|
|
105
|
-
- [Install k9s](https://k9scli.io/topics/install/)
|
|
106
|
-
|
|
107
|
-
**Usage:**
|
|
108
|
-
```shell
|
|
109
|
-
k9s
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### kubectx and kubens
|
|
113
|
-
|
|
114
|
-
Tools for switching between Kubernetes contexts and namespaces.
|
|
115
|
-
|
|
116
|
-
**Installation:**
|
|
117
|
-
- [Install kubectx](https://github.com/ahmetb/kubectx#installation)
|
|
118
|
-
|
|
119
|
-
**Usage:**
|
|
120
|
-
```shell
|
|
121
|
-
kubectx # List contexts
|
|
122
|
-
kubectx my-cluster # Switch context
|
|
123
|
-
kubens my-namespace # Switch namespace
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Kubernetes Cluster
|
|
127
|
-
|
|
128
|
-
You need access to a Kubernetes cluster for deployment.
|
|
129
|
-
|
|
130
|
-
### Local development clusters
|
|
131
|
-
|
|
132
|
-
**Minikube**
|
|
133
|
-
```shell
|
|
134
|
-
# Install
|
|
135
|
-
# https://minikube.sigs.k8s.io/docs/start/
|
|
136
|
-
|
|
137
|
-
# Start cluster
|
|
138
|
-
minikube start
|
|
139
|
-
|
|
140
|
-
# Verify
|
|
141
|
-
kubectl cluster-info
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**kind (Kubernetes in Docker)**
|
|
145
|
-
```shell
|
|
146
|
-
# Install
|
|
147
|
-
# https://kind.sigs.k8s.io/docs/user/quick-start/
|
|
148
|
-
|
|
149
|
-
# Create cluster
|
|
150
|
-
kind create cluster --name plone-dev
|
|
151
|
-
|
|
152
|
-
# Verify
|
|
153
|
-
kubectl cluster-info
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**Docker Desktop**
|
|
157
|
-
- Enable Kubernetes in Docker Desktop settings
|
|
158
|
-
- Verify with `kubectl cluster-info`
|
|
159
|
-
|
|
160
|
-
**k3d (Lightweight Kubernetes)**
|
|
161
|
-
```shell
|
|
162
|
-
# Install
|
|
163
|
-
# https://k3d.io/
|
|
164
|
-
|
|
165
|
-
# Create cluster
|
|
166
|
-
k3d cluster create plone-dev
|
|
167
|
-
|
|
168
|
-
# Verify
|
|
169
|
-
kubectl cluster-info
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Cloud Kubernetes services
|
|
173
|
-
|
|
174
|
-
**Google Kubernetes Engine (GKE)**
|
|
175
|
-
```shell
|
|
176
|
-
# Create cluster
|
|
177
|
-
gcloud container clusters create plone-cluster \
|
|
178
|
-
--num-nodes=3 \
|
|
179
|
-
--machine-type=n1-standard-2
|
|
180
|
-
|
|
181
|
-
# Get credentials
|
|
182
|
-
gcloud container clusters get-credentials plone-cluster
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**Amazon EKS**
|
|
186
|
-
```shell
|
|
187
|
-
# Create cluster using eksctl
|
|
188
|
-
eksctl create cluster \
|
|
189
|
-
--name plone-cluster \
|
|
190
|
-
--nodes 3 \
|
|
191
|
-
--node-type t3.medium
|
|
192
|
-
|
|
193
|
-
# Verify
|
|
194
|
-
kubectl get nodes
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Azure Kubernetes Service (AKS)**
|
|
198
|
-
```shell
|
|
199
|
-
# Create cluster
|
|
200
|
-
az aks create \
|
|
201
|
-
--resource-group myResourceGroup \
|
|
202
|
-
--name plone-cluster \
|
|
203
|
-
--node-count 3 \
|
|
204
|
-
--node-vm-size Standard_D2_v2
|
|
205
|
-
|
|
206
|
-
# Get credentials
|
|
207
|
-
az aks get-credentials \
|
|
208
|
-
--resource-group myResourceGroup \
|
|
209
|
-
--name plone-cluster
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Cluster requirements
|
|
213
|
-
|
|
214
|
-
### Minimum resources
|
|
215
|
-
|
|
216
|
-
**For development/testing:**
|
|
217
|
-
- **Nodes:** 1-2 nodes
|
|
218
|
-
- **CPU:** 2+ cores per node
|
|
219
|
-
- **Memory:** 4GB+ per node
|
|
220
|
-
- **Storage:** 20GB+ per node
|
|
221
|
-
|
|
222
|
-
**For production:**
|
|
223
|
-
- **Nodes:** 3+ nodes (for high availability)
|
|
224
|
-
- **CPU:** 4+ cores per node
|
|
225
|
-
- **Memory:** 8GB+ per node
|
|
226
|
-
- **Storage:** 50GB+ per node
|
|
227
|
-
|
|
228
|
-
### Required Kubernetes features
|
|
229
|
-
|
|
230
|
-
- **Version:** Kubernetes 1.30+ (the default `preStop` hook uses the native `sleep` action)
|
|
231
|
-
- **Networking:** CNI plugin installed
|
|
232
|
-
- **Storage:** StorageClass with dynamic provisioning
|
|
233
|
-
- **DNS:** CoreDNS or equivalent
|
|
234
|
-
|
|
235
|
-
**Verify storage classes:**
|
|
236
|
-
```shell
|
|
237
|
-
kubectl get storageclasses
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
If no storage class exists, you need to configure one for your cluster.
|
|
241
|
-
|
|
242
|
-
## Namespace setup
|
|
243
|
-
|
|
244
|
-
Create a namespace for your Plone deployment:
|
|
245
|
-
|
|
246
|
-
```shell
|
|
247
|
-
# Create namespace
|
|
248
|
-
kubectl create namespace plone
|
|
249
|
-
|
|
250
|
-
# Set as default (optional)
|
|
251
|
-
kubectl config set-context --current --namespace=plone
|
|
252
|
-
|
|
253
|
-
# Verify
|
|
254
|
-
kubectl config view --minify | grep namespace:
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
## Image registry access
|
|
258
|
-
|
|
259
|
-
### Public registries
|
|
260
|
-
|
|
261
|
-
No configuration needed for public Plone images:
|
|
262
|
-
- `plone/plone-backend:6.1.3`
|
|
263
|
-
- `plone/plone-frontend:16.0.0`
|
|
264
|
-
|
|
265
|
-
### Private registries
|
|
266
|
-
|
|
267
|
-
Create a pull secret for private registries:
|
|
268
|
-
|
|
269
|
-
**Docker Hub:**
|
|
270
|
-
```shell
|
|
271
|
-
kubectl create secret docker-registry docker-hub \
|
|
272
|
-
--docker-server=docker.io \
|
|
273
|
-
--docker-username=YOUR_USERNAME \
|
|
274
|
-
--docker-password=YOUR_PASSWORD \
|
|
275
|
-
--docker-email=YOUR_EMAIL
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Google Container Registry:**
|
|
279
|
-
```shell
|
|
280
|
-
kubectl create secret docker-registry gcr-secret \
|
|
281
|
-
--docker-server=gcr.io \
|
|
282
|
-
--docker-username=_json_key \
|
|
283
|
-
--docker-password="$(cat keyfile.json)" \
|
|
284
|
-
--docker-email=user@example.com
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**Azure Container Registry:**
|
|
288
|
-
```shell
|
|
289
|
-
kubectl create secret docker-registry acr-secret \
|
|
290
|
-
--docker-server=myregistry.azurecr.io \
|
|
291
|
-
--docker-username=YOUR_USERNAME \
|
|
292
|
-
--docker-password=YOUR_PASSWORD
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
Use the secret in your deployment:
|
|
296
|
-
```typescript
|
|
297
|
-
new Plone(chart, 'my-plone', {
|
|
298
|
-
imagePullSecrets: ['docker-hub', 'gcr-secret'],
|
|
299
|
-
backend: { image: 'private-registry.io/plone-backend:6.1.3' },
|
|
300
|
-
});
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
## Verification checklist
|
|
304
|
-
|
|
305
|
-
Before proceeding, verify:
|
|
306
|
-
|
|
307
|
-
- [ ] kubectl installed and configured
|
|
308
|
-
- [ ] Access to Kubernetes cluster verified
|
|
309
|
-
- [ ] Node.js or Python installed (depending on your language choice)
|
|
310
|
-
- [ ] CDK8S CLI installed
|
|
311
|
-
- [ ] Namespace created (optional but recommended)
|
|
312
|
-
- [ ] Storage class available in cluster
|
|
313
|
-
- [ ] Image pull secrets created (if using private registries)
|
|
314
|
-
|
|
315
|
-
**Verify everything:**
|
|
316
|
-
```shell
|
|
317
|
-
# Check tools
|
|
318
|
-
kubectl version --client
|
|
319
|
-
cdk8s --version
|
|
320
|
-
node --version # or python --version
|
|
321
|
-
|
|
322
|
-
# Check cluster access
|
|
323
|
-
kubectl cluster-info
|
|
324
|
-
kubectl get nodes
|
|
325
|
-
kubectl get storageclasses
|
|
326
|
-
|
|
327
|
-
# Check namespace
|
|
328
|
-
kubectl get namespace plone
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
## Next steps
|
|
332
|
-
|
|
333
|
-
Now that your environment is ready:
|
|
334
|
-
|
|
335
|
-
1. **Start the tutorial**: Follow the {doc}`/tutorials/01-quick-start` guide.
|
|
336
|
-
2. **Explore examples**: Check the [example project](https://github.com/bluedynamics/cdk8s-plone-example).
|
|
337
|
-
3. **Read about variants**: Learn about {ref}`deployment-variants` in the features overview.
|
|
338
|
-
|
|
339
|
-
## Troubleshooting
|
|
340
|
-
|
|
341
|
-
### kubectl: command not found
|
|
342
|
-
- Ensure kubectl is in your PATH
|
|
343
|
-
- Reinstall following the [official guide](https://kubernetes.io/docs/tasks/tools/#kubectl)
|
|
344
|
-
|
|
345
|
-
### Cannot connect to cluster
|
|
346
|
-
- Verify kubeconfig: `kubectl config view`
|
|
347
|
-
- Check cluster status: `kubectl cluster-info`
|
|
348
|
-
- Ensure VPN is connected (if required)
|
|
349
|
-
|
|
350
|
-
### No storage classes available
|
|
351
|
-
- Check cluster documentation for storage setup
|
|
352
|
-
- For local clusters, storage is usually pre-configured
|
|
353
|
-
- For cloud providers, ensure CSI drivers are installed
|
|
354
|
-
|
|
355
|
-
### Permission denied errors
|
|
356
|
-
- Verify RBAC permissions: `kubectl auth can-i create deployments`
|
|
357
|
-
- Contact your cluster administrator for proper permissions
|
|
358
|
-
|
|
359
|
-
## See also
|
|
360
|
-
|
|
361
|
-
- {doc}`/tutorials/01-quick-start` — Get started with deployment.
|
|
362
|
-
- {doc}`/explanation/architecture` — Understand the system.
|
|
363
|
-
- {doc}`/reference/configuration-options` — Complete configuration reference.
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
myst:
|
|
3
|
-
html_meta:
|
|
4
|
-
"description": "Diagnose and fix common cdk8s-plone problems: pods not scheduling, crashes, failing probes, database connection errors, and synth failures."
|
|
5
|
-
"property=og:description": "Diagnose and fix common cdk8s-plone problems: pods not scheduling, crashes, failing probes, database connection errors, and synth failures."
|
|
6
|
-
"property=og:title": "Troubleshoot a deployment"
|
|
7
|
-
"keywords": "Plone, cdk8s, Kubernetes, troubleshooting, CrashLoopBackOff, probes, scheduling, synth"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Troubleshoot a deployment
|
|
11
|
-
|
|
12
|
-
This guide shows you how to diagnose and fix the problems you are most likely to hit when you deploy Plone with `cdk8s-plone`.
|
|
13
|
-
|
|
14
|
-
Start by looking at the overall state, then drill into the failing object.
|
|
15
|
-
|
|
16
|
-
```shell
|
|
17
|
-
kubectl get pods -n <namespace>
|
|
18
|
-
kubectl describe pod <pod> -n <namespace>
|
|
19
|
-
kubectl logs <pod> -n <namespace>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## `cdk8s synth` fails
|
|
23
|
-
|
|
24
|
-
If `synth` fails while rendering `PloneHttpcache`, confirm the `helm` CLI is installed and on your `PATH`.
|
|
25
|
-
`PloneHttpcache` renders the kube-httpcache Helm chart at synth time and shells out to `helm`.
|
|
26
|
-
|
|
27
|
-
If `synth` fails on a missing custom resource type, run the example's import step (`npm run import`) to regenerate the CRD bindings.
|
|
28
|
-
|
|
29
|
-
## Pods stay `Pending`
|
|
30
|
-
|
|
31
|
-
Describe the pod and read the `Events` section for the scheduler's reason.
|
|
32
|
-
|
|
33
|
-
```shell
|
|
34
|
-
kubectl describe pod <pod> -n <namespace>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Common causes:
|
|
38
|
-
|
|
39
|
-
- Insufficient CPU or memory on the nodes. Lower `requestCpu` or `requestMemory`, or add capacity.
|
|
40
|
-
- A `nodeSelector` or `tolerations` setting that no node satisfies. See {doc}`/how-to/schedule-pods`.
|
|
41
|
-
- `PloneHttpcache` pods only schedule on amd64 nodes, because the construct hard-codes `kubernetes.io/arch=amd64`. Provide an amd64 node or use {doc}`/how-to/deploy-with-vinyl-cache` instead.
|
|
42
|
-
|
|
43
|
-
## A pod is in `CrashLoopBackOff`
|
|
44
|
-
|
|
45
|
-
Read the logs of the current and previous container starts.
|
|
46
|
-
|
|
47
|
-
```shell
|
|
48
|
-
kubectl logs <pod> -n <namespace>
|
|
49
|
-
kubectl logs <pod> -n <namespace> --previous
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
A backend that exits immediately almost always cannot reach its database.
|
|
53
|
-
See {ref}`backend-db-connection`.
|
|
54
|
-
|
|
55
|
-
(backend-db-connection)=
|
|
56
|
-
|
|
57
|
-
## The backend cannot reach the database
|
|
58
|
-
|
|
59
|
-
The backend uses RelStorage on PostgreSQL, so it needs a correct connection string and credentials.
|
|
60
|
-
|
|
61
|
-
- Confirm the database is running and reachable from the backend namespace.
|
|
62
|
-
- Confirm the environment variable that carries the DSN resolves from its Secret. See {doc}`/how-to/configure-env-and-secrets`.
|
|
63
|
-
|
|
64
|
-
```shell
|
|
65
|
-
kubectl get secret -n <namespace>
|
|
66
|
-
kubectl exec -n <namespace> deployment/<backend-deployment> -- env | grep -i storage
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Pods never become ready
|
|
70
|
-
|
|
71
|
-
A pod that stays `Running` but never `Ready` is failing its readiness probe.
|
|
72
|
-
|
|
73
|
-
- Increase `readinessInitialDelaySeconds` if the backend needs longer to start.
|
|
74
|
-
- Increase `readinessTimeoutSeconds` or `readinessFailureThreshold` for a slow first request.
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
backend: {
|
|
78
|
-
image: 'plone/plone-backend:6.1.3',
|
|
79
|
-
readinessInitialDelaySeconds: 30,
|
|
80
|
-
readinessTimeoutSeconds: 15,
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Liveness probes are disabled by default (`livenessEnabled` defaults to `false`).
|
|
85
|
-
If pods restart in a loop after you enable liveness, raise `livenessInitialDelaySeconds` so the probe does not fire during startup.
|
|
86
|
-
|
|
87
|
-
## The cache does not cache
|
|
88
|
-
|
|
89
|
-
Check the cache pod logs, then confirm requests reach the cache service rather than the backend or frontend directly.
|
|
90
|
-
|
|
91
|
-
```shell
|
|
92
|
-
kubectl logs -n <namespace> -l app.kubernetes.io/part-of=plone
|
|
93
|
-
kubectl run -it --rm curl --image=curlimages/curl --restart=Never -- \
|
|
94
|
-
curl -sI http://<cache-service>.<namespace>:80/
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
A missing `X-Varnish` header means traffic bypasses the cache; point your ingress at the cache service. See {doc}`/how-to/configure-ingress-tls`.
|
|
98
|
-
For VCL behavior, see {doc}`/how-to/deploy-with-httpcache` and {doc}`/how-to/deploy-with-vinyl-cache`.
|
|
99
|
-
|
|
100
|
-
## Prometheus does not scrape the metrics
|
|
101
|
-
|
|
102
|
-
If a `ServiceMonitor` exists but no target appears in Prometheus, the selectors do not match.
|
|
103
|
-
|
|
104
|
-
- Confirm the `ServiceMonitor` namespace matches the `Prometheus` resource's `serviceMonitorNamespaceSelector`.
|
|
105
|
-
- Confirm its labels match the `Prometheus` resource's `serviceMonitorSelector`.
|
|
106
|
-
|
|
107
|
-
See {doc}`/how-to/enable-prometheus-monitoring` for the full setup.
|
|
108
|
-
|
|
109
|
-
## See also
|
|
110
|
-
|
|
111
|
-
- {doc}`/how-to/deploy-volto` — a complete deployment to compare against.
|
|
112
|
-
- {doc}`/reference/api/index` — authoritative option and default reference.
|
|
113
|
-
- {doc}`/explanation/architecture` — how the components depend on each other.
|