Skip to content

Commit b63e5cf

Browse files
committed
removed upgrade stuff as caren will take care of it
1 parent 6771cdb commit b63e5cf

File tree

1 file changed

+1
-62
lines changed
  • examples/capi-quick-start/nutanix-cluster-hardened-clusterclass/worker

1 file changed

+1
-62
lines changed

examples/capi-quick-start/nutanix-cluster-hardened-clusterclass/worker/README.md

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -111,65 +111,4 @@ kubectl patch clusterclass nkp-nutanix-<VERSION> \
111111
"path":"/spec/workers/machineDeployments/0/template/bootstrap/ref/name",
112112
"value":"nkp-nutanix-worker-<VERSION>-hardened"
113113
}]'
114-
```
115-
116-
## Handling Upgrades
117-
118-
When upgrading to a new Nutanix Kubernetes Platform version, you'll need to create hardened templates for the new version. Follow these steps:
119-
120-
1. Upgrade CAPI components first:
121-
122-
```bash
123-
nkp upgrade capi-components
124-
```
125-
126-
2. Identify the new worker template version and export it:
127-
128-
```bash
129-
# List available templates after upgrade
130-
kubectl get kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io
131-
132-
# Export the new template (replace <NEW_VERSION> with the actual new version, e.g., v2.15.0)
133-
kubectl get kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io nkp-nutanix-worker-<NEW_VERSION> -o yaml > nkp-nutanix-worker-<NEW_VERSION>.yaml
134-
```
135-
136-
3. Create a new directory for the new version and copy the kustomization files there:
137-
138-
```bash
139-
mkdir -p /path/to/hardened-clusters/kustomize/worker-<NEW_VERSION>
140-
cp /path/to/hardened-clusters/kustomize/worker/cis-mitigations-worker-patch.yaml /path/to/hardened-clusters/kustomize/worker-<NEW_VERSION>/
141-
cp /path/to/hardened-clusters/kustomize/worker/kustomization.yaml /path/to/hardened-clusters/kustomize/worker-<NEW_VERSION>/
142-
```
143-
144-
4. Update the files in the new directory to use the new version:
145-
146-
```bash
147-
# Edit the version in both files
148-
sed -i 's/<VERSION>/<NEW_VERSION>/g' /path/to/hardened-clusters/kustomize/worker-<NEW_VERSION>/cis-mitigations-worker-patch.yaml
149-
sed -i 's/<VERSION>/<NEW_VERSION>/g' /path/to/hardened-clusters/kustomize/worker-<NEW_VERSION>/kustomization.yaml
150-
```
151-
152-
5. Apply the kustomization for the new version:
153-
154-
```bash
155-
kubectl apply -k /path/to/hardened-clusters/kustomize/worker-<NEW_VERSION>
156-
```
157-
158-
6. Patch the new cluster class to use the hardened template:
159-
160-
```bash
161-
# Replace <NEW_VERSION> with the actual new version
162-
kubectl patch clusterclass nkp-nutanix-<NEW_VERSION> \
163-
--type json \
164-
-p='[{
165-
"op":"replace",
166-
"path":"/spec/workers/machineDeployments/0/template/bootstrap/ref/name",
167-
"value":"nkp-nutanix-worker-<NEW_VERSION>-hardened"
168-
}]'
169-
```
170-
171-
7. Upgrade the cluster using the new patched cluster class:
172-
173-
```bash
174-
nkp upgrade cluster nutanix <additional_variables> --cluster-class nkp-nutanix-<NEW_VERSION>
175-
```
114+
```

0 commit comments

Comments
 (0)