Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99cf885600 | ||
|
|
33f72fb88c | ||
|
|
99cae11da3 | ||
|
|
01999ce28f | ||
|
|
8e87e33937 | ||
|
|
1c1a1b2441 | ||
|
|
eb7794962f | ||
|
|
f25d2fdfe9 | ||
|
|
2b5637516a | ||
|
|
ce6173b06a | ||
|
|
22dfe9a26b | ||
|
|
185e0c96d5 | ||
|
|
e55e46d020 | ||
|
|
cf139cd580 | ||
|
|
0623e151bb | ||
|
|
17a8061722 | ||
|
|
f6a708e897 | ||
|
|
b8516bae50 | ||
|
|
6d05f426d0 | ||
|
|
0466bd6929 |
No files matched your search
@@ -101,8 +101,8 @@ jobs:
|
||||
run: |
|
||||
pulumi login "$PULUMI_BACKEND_URL"
|
||||
pulumi refresh --yes --stack dev \
|
||||
--target 'urn:pulumi:dev::proxmox-infra::proxmoxve*' \
|
||||
--target 'urn:pulumi:dev::proxmox-infra::tls*'
|
||||
--target 'urn:pulumi:dev::proxmox-infra::proxmoxve**' \
|
||||
--target 'urn:pulumi:dev::proxmox-infra::tls**'
|
||||
working-directory: 01-proxmox-infra
|
||||
env:
|
||||
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
name: Deploy Openbao
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "06-openbao/**"
|
||||
- ".gitea/workflows/06-deploy-openbao.yaml"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "06-openbao/**"
|
||||
- ".gitea/workflows/**"
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
name: Pulumi Preview
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'pull_request'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Checkout Stack Config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: kasun/homelab-pulumi-config
|
||||
ref: main
|
||||
token: ${{ secrets.PULUMI_CONFIG_REPO_TOKEN }}
|
||||
path: .pulumi-config
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
working-directory: 06-openbao
|
||||
|
||||
- name: Preview
|
||||
uses: pulumi/actions@v5
|
||||
with:
|
||||
command: preview
|
||||
stack-name: dev
|
||||
work-dir: 06-openbao
|
||||
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
|
||||
env:
|
||||
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|
||||
|
||||
deploy:
|
||||
name: Pulumi Deploy
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
|
||||
- name: Checkout Stack Config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: kasun/homelab-pulumi-config
|
||||
ref: main
|
||||
token: ${{ secrets.PULUMI_CONFIG_REPO_TOKEN }}
|
||||
path: .pulumi-config
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
working-directory: 06-openbao
|
||||
|
||||
- name: Refresh State
|
||||
uses: pulumi/actions@v5
|
||||
with:
|
||||
command: refresh
|
||||
stack-name: dev
|
||||
work-dir: 06-openbao
|
||||
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
|
||||
env:
|
||||
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|
||||
|
||||
- name: Deploy
|
||||
uses: pulumi/actions@v5
|
||||
with:
|
||||
command: up
|
||||
stack-name: dev
|
||||
work-dir: 06-openbao
|
||||
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
|
||||
env:
|
||||
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
|
||||
@@ -391,6 +391,7 @@ new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
|
||||
},
|
||||
started: true,
|
||||
startOnBoot: true,
|
||||
protection: true,
|
||||
},
|
||||
{
|
||||
provider: ansibleHost.provider,
|
||||
|
||||
Generated
+3
-3
@@ -655,9 +655,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pulumi/tls": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/tls/-/tls-5.5.0.tgz",
|
||||
"integrity": "sha512-OTGxp4sgDEuXlXrd7NtxrhhciPgcn9rqDIZlGOTmTaeGo+tlVMwv73FFqiVrzAmBiILdU8tLXHfxhjc+bTLdrQ==",
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/tls/-/tls-5.6.3.tgz",
|
||||
"integrity": "sha512-glAX4KYmsEGOXPz7yFKcErSogfknYB/4h2/EdeVXifZGW8ic47HCjNI5zPHF4+0DcwmNdLGA7fm2qQz69wS9EA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@pulumi/pulumi": "^3.142.0"
|
||||
|
||||
@@ -62,6 +62,9 @@ const k3sToken = config.requireSecret("k3sToken");
|
||||
const k3sVersion = "v1.36.2+k3s1";
|
||||
const k3sInstallerUrl = `https://raw.githubusercontent.com/k3s-io/k3s/${encodeURIComponent(k3sVersion)}/install.sh`;
|
||||
|
||||
const secretsEncryptionArgs =
|
||||
"--secrets-encryption --secrets-encryption-provider=secretbox";
|
||||
|
||||
// Runs the pinned installer. The token arrives on stdin and travels in the
|
||||
// environment, so it never appears in process arguments.
|
||||
function k3sInstallScript(
|
||||
@@ -184,7 +187,7 @@ const installMaster1 = new command.remote.Command(
|
||||
connection: conn(master1Ip),
|
||||
create: k3sInstallScript(
|
||||
"",
|
||||
pulumi.interpolate`server --cluster-init --tls-san ${master1Ip} --tls-san ${controlPlaneVipAddress} --disable servicelb --node-name k3s-master-1`,
|
||||
pulumi.interpolate`server --cluster-init --tls-san ${master1Ip} --tls-san ${controlPlaneVipAddress} --disable servicelb ${secretsEncryptionArgs} --node-name k3s-master-1`,
|
||||
),
|
||||
stdin: k3sToken,
|
||||
triggers: [master1VmId],
|
||||
@@ -257,7 +260,7 @@ const joinMaster2 = new command.remote.Command(
|
||||
connection: conn(master2Ip),
|
||||
create: k3sInstallScript(
|
||||
"",
|
||||
pulumi.interpolate`server --server https://${controlPlaneVipAddress}:6443 --disable servicelb --node-name k3s-master-2`,
|
||||
pulumi.interpolate`server --server https://${controlPlaneVipAddress}:6443 --disable servicelb ${secretsEncryptionArgs} --node-name k3s-master-2`,
|
||||
),
|
||||
stdin: k3sToken,
|
||||
triggers: [master2VmId],
|
||||
@@ -271,7 +274,7 @@ const joinMaster3 = new command.remote.Command(
|
||||
connection: conn(master3Ip),
|
||||
create: k3sInstallScript(
|
||||
"",
|
||||
pulumi.interpolate`server --server https://${controlPlaneVipAddress}:6443 --disable servicelb --node-name k3s-master-3`,
|
||||
pulumi.interpolate`server --server https://${controlPlaneVipAddress}:6443 --disable servicelb ${secretsEncryptionArgs} --node-name k3s-master-3`,
|
||||
),
|
||||
stdin: k3sToken,
|
||||
triggers: [master3VmId],
|
||||
|
||||
Generated
+4
-180
@@ -7,7 +7,6 @@
|
||||
"name": "k8s-bootstrap",
|
||||
"dependencies": {
|
||||
"@pulumi/command": "^1.2.1",
|
||||
"@pulumi/kubernetes": "^4.31.1",
|
||||
"@pulumi/pulumi": "^3.244.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -46,15 +45,6 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/@isaacs/cliui": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz",
|
||||
"integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@js-sdsl/ordered-map": {
|
||||
"version": "4.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
|
||||
@@ -603,48 +593,13 @@
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@pulumi/command": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/command/-/command-1.2.1.tgz",
|
||||
"integrity": "sha512-mutNDIUYP67yCBYOVIidQyxuTwZDY9v/sx9EGbgIv4PXfyfolOKGgGLeoHEbI1lxRwaw2wbTZ3VNIynDnA5VKA==",
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/command/-/command-1.3.0.tgz",
|
||||
"integrity": "sha512-KrRVG/CmN9yCYJ1Rqn5mkond5wbeLNbgrclityNNN8hgltjSVZ2xwlxAw84fApNk9Bu3AV1bwN5Q/XD56Kisvg==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@pulumi/pulumi": "^3.142.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pulumi/kubernetes": {
|
||||
"version": "4.32.0",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.32.0.tgz",
|
||||
"integrity": "sha512-JMzaG8BI+nsHzcOwFEbmueyn2HN4HrLv1znVAKS0vPgLrlSAc+WDsaRUxQnHBE37+3RL3r4mipUemRCIe8Xvww==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@pulumi/pulumi": "^3.142.0",
|
||||
"glob": "^12.0.0",
|
||||
"shell-quote": "^1.6.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@pulumi/kubernetes/node_modules/glob": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-12.0.0.tgz",
|
||||
"integrity": "sha512-5Qcll1z7IKgHr5g485ePDdHcNQY0k2dtv/bjYy0iuyGxQw2qSOiiXUXJ+AYQpg3HNoUMHqAruX478Jeev7UULw==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.3.1",
|
||||
"jackspeak": "^4.1.1",
|
||||
"minimatch": "^10.1.1",
|
||||
"minipass": "^7.1.2",
|
||||
"package-json-from-dist": "^1.0.0",
|
||||
"path-scurry": "^2.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"glob": "dist/esm/bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
"@pulumi/pulumi": "^3.269.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@pulumi/pulumi": {
|
||||
@@ -745,27 +700,6 @@
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
||||
"license": "Python-2.0"
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
|
||||
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.0.tgz",
|
||||
"integrity": "sha512-aa11Dv491GKnYqxaul3aRJ0szew7yMJMfZPnqD44NjGrZXoj62l41OEDDpdpC4eE2P88vBFfLuSyRhpG91NUvg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer-from": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||
@@ -906,34 +840,6 @@
|
||||
"url": "https://github.com/sindresorhus/execa?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/foreground-child": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
|
||||
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cross-spawn": "^7.0.6",
|
||||
"signal-exit": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/foreground-child/node_modules/signal-exit": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
@@ -1014,21 +920,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/jackspeak": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz",
|
||||
"integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/cliui": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",
|
||||
@@ -1063,15 +954,6 @@
|
||||
"integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "11.5.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",
|
||||
"integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
@@ -1087,21 +969,6 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "10.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
|
||||
"integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^5.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
@@ -1111,15 +978,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/minipass": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
|
||||
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/module-details-from-path": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz",
|
||||
@@ -1191,12 +1049,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/package-json-from-dist": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
|
||||
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
||||
"license": "BlueOak-1.0.0"
|
||||
},
|
||||
"node_modules/path-key": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||
@@ -1206,22 +1058,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/path-scurry": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
|
||||
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"lru-cache": "^11.0.0",
|
||||
"minipass": "^7.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/protobufjs": {
|
||||
"version": "7.6.6",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz",
|
||||
@@ -1309,18 +1145,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shell-quote": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.12.0.tgz",
|
||||
"integrity": "sha512-PcByqNyT/38F2kDNi006HAMRJaULuBzq/FOsw3qdZvX/GA9W/jamDaRskgHjubHiftXK5sIFxLNkvrXUwcof6Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@pulumi/command": "^1.2.1",
|
||||
"@pulumi/kubernetes": "^4.31.1",
|
||||
"@pulumi/pulumi": "^3.244.0"
|
||||
}
|
||||
}
|
||||
Generated
+3
-3
@@ -602,9 +602,9 @@
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@pulumi/kubernetes": {
|
||||
"version": "4.31.1",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.31.1.tgz",
|
||||
"integrity": "sha512-EaDBJBKXrvBVvsuN1UbN8WMXyKy4K3g7VfiSb5eCTq2sgql8wWIMZw6vIYyh9tc9b5UONq/LgoNINGJT0uvX9w==",
|
||||
"version": "4.35.0",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.35.0.tgz",
|
||||
"integrity": "sha512-kTZCuaVX+pTIkChZ1Q5THhMKYu+3RMqrop/n6KYaKd7DzbrRu904x6wrs0P5TT/9475ZUud4Xr+piqYDgFDshw==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
||||
Generated
+3
-3
@@ -602,9 +602,9 @@
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@pulumi/kubernetes": {
|
||||
"version": "4.31.1",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.31.1.tgz",
|
||||
"integrity": "sha512-EaDBJBKXrvBVvsuN1UbN8WMXyKy4K3g7VfiSb5eCTq2sgql8wWIMZw6vIYyh9tc9b5UONq/LgoNINGJT0uvX9w==",
|
||||
"version": "4.35.0",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.35.0.tgz",
|
||||
"integrity": "sha512-kTZCuaVX+pTIkChZ1Q5THhMKYu+3RMqrop/n6KYaKd7DzbrRu904x6wrs0P5TT/9475ZUud4Xr+piqYDgFDshw==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
||||
Generated
+3
-3
@@ -602,9 +602,9 @@
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/@pulumi/kubernetes": {
|
||||
"version": "4.31.1",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.31.1.tgz",
|
||||
"integrity": "sha512-EaDBJBKXrvBVvsuN1UbN8WMXyKy4K3g7VfiSb5eCTq2sgql8wWIMZw6vIYyh9tc9b5UONq/LgoNINGJT0uvX9w==",
|
||||
"version": "4.35.0",
|
||||
"resolved": "https://registry.npmjs.org/@pulumi/kubernetes/-/kubernetes-4.35.0.tgz",
|
||||
"integrity": "sha512-kTZCuaVX+pTIkChZ1Q5THhMKYu+3RMqrop/n6KYaKd7DzbrRu904x6wrs0P5TT/9475ZUud4Xr+piqYDgFDshw==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
name: openbao
|
||||
description: Openbao stack for centralized ha secret management
|
||||
runtime:
|
||||
name: nodejs
|
||||
options:
|
||||
packagemanager: npm
|
||||
stackConfigDir: ../.pulumi-config/06-openbao
|
||||
@@ -0,0 +1,260 @@
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
import * as k8s from "@pulumi/kubernetes";
|
||||
|
||||
const bootstrapRef = new pulumi.StackReference(
|
||||
`${pulumi.getOrganization()}/k8s-bootstrap/dev`,
|
||||
);
|
||||
const appsRef = new pulumi.StackReference(
|
||||
`${pulumi.getOrganization()}/k8s-apps/dev`,
|
||||
);
|
||||
|
||||
const kubeconfig = bootstrapRef.requireOutput("kubeconfig");
|
||||
const domain = appsRef.requireOutput("domain");
|
||||
const openbaoHost = pulumi.interpolate`bao.${domain}`;
|
||||
|
||||
const k8sProvider = new k8s.Provider("k3s", {
|
||||
kubeconfig,
|
||||
clusterIdentifier: "homelab-k3s",
|
||||
});
|
||||
|
||||
const opts = (extras?: pulumi.ResourceOptions): pulumi.ResourceOptions => ({
|
||||
provider: k8sProvider,
|
||||
...extras,
|
||||
});
|
||||
|
||||
const openbaoNs = new k8s.core.v1.Namespace(
|
||||
"openbao",
|
||||
{ metadata: { name: "openbao" } },
|
||||
{ provider: k8sProvider, protect: true },
|
||||
);
|
||||
|
||||
const selfsigned = new k8s.apiextensions.CustomResource(
|
||||
"openbao-selfsigned",
|
||||
{
|
||||
apiVersion: "cert-manager.io/v1",
|
||||
kind: "Issuer",
|
||||
metadata: {
|
||||
name: "openbao-selfsigned",
|
||||
namespace: openbaoNs.metadata.name,
|
||||
},
|
||||
spec: {
|
||||
selfSigned: {},
|
||||
},
|
||||
},
|
||||
opts(),
|
||||
);
|
||||
|
||||
const caCert = new k8s.apiextensions.CustomResource(
|
||||
"openbao-ca",
|
||||
{
|
||||
apiVersion: "cert-manager.io/v1",
|
||||
kind: "Certificate",
|
||||
metadata: { name: "openbao-ca", namespace: openbaoNs.metadata.name },
|
||||
spec: {
|
||||
secretName: "openbao-ca",
|
||||
commonName: "openbao-ca",
|
||||
isCA: true,
|
||||
issuerRef: { name: "openbao-selfsigned", kind: "Issuer" },
|
||||
duration: "87600h",
|
||||
},
|
||||
},
|
||||
opts({ dependsOn: [selfsigned] }),
|
||||
);
|
||||
|
||||
const caIssuer = new k8s.apiextensions.CustomResource(
|
||||
"openbao-ca-issuer",
|
||||
{
|
||||
apiVersion: "cert-manager.io/v1",
|
||||
kind: "Issuer",
|
||||
metadata: { name: "openbao-ca", namespace: openbaoNs.metadata.name },
|
||||
spec: {
|
||||
ca: { secretName: "openbao-ca" },
|
||||
},
|
||||
},
|
||||
opts({ dependsOn: [caCert] }),
|
||||
);
|
||||
|
||||
const serverCert = new k8s.apiextensions.CustomResource(
|
||||
"openbao-server-tls",
|
||||
{
|
||||
apiVersion: "cert-manager.io/v1",
|
||||
kind: "Certificate",
|
||||
metadata: {
|
||||
name: "openbao-server-tls",
|
||||
namespace: openbaoNs.metadata.name,
|
||||
},
|
||||
spec: {
|
||||
secretName: "openbao-server-tls",
|
||||
dnsNames: [
|
||||
"openbao-0.openbao-internal",
|
||||
"openbao-1.openbao-internal",
|
||||
"openbao-2.openbao-internal",
|
||||
"openbao-active.openbao.svc",
|
||||
"localhost",
|
||||
],
|
||||
ipAddresses: ["127.0.0.1"],
|
||||
issuerRef: { name: "openbao-ca", kind: "Issuer" },
|
||||
},
|
||||
},
|
||||
opts({ dependsOn: [caIssuer] }),
|
||||
);
|
||||
|
||||
const serversTransport = new k8s.apiextensions.CustomResource(
|
||||
"openbao-servers-transport",
|
||||
{
|
||||
apiVersion: "traefik.io/v1alpha1",
|
||||
kind: "ServersTransport",
|
||||
metadata: {
|
||||
name: "openbao-servers-transport",
|
||||
namespace: openbaoNs.metadata.name,
|
||||
},
|
||||
spec: {
|
||||
serverName: "openbao-active.openbao.svc",
|
||||
rootCAs: [{ secret: "openbao-server-tls" }],
|
||||
},
|
||||
},
|
||||
opts({ dependsOn: [serverCert] }),
|
||||
);
|
||||
|
||||
new k8s.helm.v3.Release(
|
||||
"openbao",
|
||||
{
|
||||
name: "openbao",
|
||||
chart: "openbao",
|
||||
repositoryOpts: { repo: "https://openbao.github.io/openbao-helm" },
|
||||
namespace: "openbao",
|
||||
version: "0.30.8",
|
||||
// Pods stay unready until they are initialised and unsealed by hand.
|
||||
skipAwait: true,
|
||||
values: {
|
||||
global: {
|
||||
tlsDisable: false,
|
||||
},
|
||||
injector: {
|
||||
enabled: false,
|
||||
},
|
||||
server: {
|
||||
podManagementPolicy: "Parallel",
|
||||
resources: {
|
||||
requests: { cpu: "100m", memory: "256Mi" },
|
||||
limits: { memory: "512Mi" },
|
||||
},
|
||||
volumes: [
|
||||
{ name: "server-tls", secret: { secretName: "openbao-server-tls" } },
|
||||
],
|
||||
volumeMounts: [
|
||||
{
|
||||
name: "server-tls",
|
||||
mountPath: "/openbao/userconfig/openbao-server-tls",
|
||||
readOnly: true,
|
||||
},
|
||||
],
|
||||
extraEnvironmentVars: {
|
||||
BAO_CACERT: "/openbao/userconfig/openbao-server-tls/ca.crt",
|
||||
},
|
||||
service: {
|
||||
active: {
|
||||
annotations: {
|
||||
"traefik.ingress.kubernetes.io/service.serverstransport":
|
||||
"openbao-openbao-servers-transport@kubernetescrd",
|
||||
},
|
||||
},
|
||||
},
|
||||
ingress: {
|
||||
enabled: true,
|
||||
ingressClassName: "traefik",
|
||||
annotations: { "cert-manager.io/cluster-issuer": "letsencrypt-prod" },
|
||||
hosts: [{ host: openbaoHost, paths: ["/"] }],
|
||||
tls: [{ secretName: "openbao-ingress-tls", hosts: [openbaoHost] }],
|
||||
},
|
||||
networkPolicy: {
|
||||
enabled: true,
|
||||
ingress: [
|
||||
{
|
||||
from: [
|
||||
{
|
||||
namespaceSelector: {
|
||||
matchLabels: {
|
||||
"kubernetes.io/metadata.name": "kube-system",
|
||||
},
|
||||
},
|
||||
podSelector: {
|
||||
matchLabels: { "app.kubernetes.io/name": "traefik" },
|
||||
},
|
||||
},
|
||||
],
|
||||
ports: [{ port: 8200, protocol: "TCP" }],
|
||||
},
|
||||
{
|
||||
from: [
|
||||
{
|
||||
podSelector: {
|
||||
matchLabels: {
|
||||
"app.kubernetes.io/name": "openbao",
|
||||
"app.kubernetes.io/instance": "openbao",
|
||||
component: "server",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
ports: [
|
||||
{ port: 8200, protocol: "TCP" },
|
||||
{ port: 8201, protocol: "TCP" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
ha: {
|
||||
enabled: true,
|
||||
replicas: 3,
|
||||
apiAddr: "https://$(BAO_K8S_POD_NAME).openbao-internal:8200",
|
||||
raft: {
|
||||
enabled: true,
|
||||
setNodeId: true,
|
||||
config: `ui = true
|
||||
|
||||
listener "tcp" {
|
||||
address = "[::]:8200"
|
||||
cluster_address = "[::]:8201"
|
||||
tls_cert_file = "/openbao/userconfig/openbao-server-tls/tls.crt"
|
||||
tls_key_file = "/openbao/userconfig/openbao-server-tls/tls.key"
|
||||
tls_auto_reload = true
|
||||
}
|
||||
|
||||
storage "raft" {
|
||||
path = "/openbao/data"
|
||||
|
||||
retry_join {
|
||||
leader_api_addr = "https://openbao-0.openbao-internal:8200"
|
||||
leader_ca_cert_file = "/openbao/userconfig/openbao-server-tls/ca.crt"
|
||||
}
|
||||
retry_join {
|
||||
leader_api_addr = "https://openbao-1.openbao-internal:8200"
|
||||
leader_ca_cert_file = "/openbao/userconfig/openbao-server-tls/ca.crt"
|
||||
}
|
||||
retry_join {
|
||||
leader_api_addr = "https://openbao-2.openbao-internal:8200"
|
||||
leader_ca_cert_file = "/openbao/userconfig/openbao-server-tls/ca.crt"
|
||||
}
|
||||
}
|
||||
|
||||
service_registration "kubernetes" {}
|
||||
|
||||
audit "file" "stdout" {
|
||||
options {
|
||||
file_path = "stdout"
|
||||
}
|
||||
}
|
||||
`,
|
||||
},
|
||||
},
|
||||
dataStorage: {
|
||||
enabled: true,
|
||||
storageClass: "local-path",
|
||||
size: "2Gi",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
opts({ dependsOn: [serversTransport], protect: true }),
|
||||
);
|
||||
Generated
+1499
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "openbao",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.19.4",
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pulumi/kubernetes": "^4.31.1",
|
||||
"@pulumi/pulumi": "^3.278.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"outDir": "bin",
|
||||
"target": "es2024",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"sourceMap": true,
|
||||
"experimentalDecorators": true,
|
||||
"pretty": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitReturns": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.ts"
|
||||
]
|
||||
}
|
||||
@@ -85,6 +85,8 @@ Check the new cluster with its own kubeconfig:
|
||||
KUBECONFIG=~/k3s-rebuilt.yaml kubectl get nodes
|
||||
```
|
||||
|
||||
Secret encryption is configured with `secretbox`.
|
||||
|
||||
**Checkpoint:** all six nodes are `Ready`. Then replace your normal kubeconfig with this file, because the old one no longer works.
|
||||
|
||||
## 4. Deploy `03`, `04` and `05`
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
# Turn on k3s Secret encryption
|
||||
|
||||
Use this once to encrypt the Secrets in an existing cluster with `secretbox`. Don't use it for fresh installs, because `02-k8s-bootstrap` turns on encryption during installation. Don't use it to rotate keys later either.
|
||||
|
||||
> Steps 1–5 worked on the live cluster on 2026-12-01 with `v1.36.2+k3s1`. They're based on the k3s guide for existing clusters and the source code for that version. The guide doesn't cover starting with `secretbox`. **If a check doesn't match, stop.** Don't repeat `rotate-keys`, use `--force` or delete k3s files.
|
||||
|
||||
Don't deploy `02`, run the k3s installer or recreate VMs for this change.
|
||||
|
||||
## Before you start
|
||||
|
||||
1. Check that you have current VM backups of all 3 masters. They contain unencrypted Secrets, so restrict access to them.
|
||||
2. Pause deployments, and don't merge anything until you finish.
|
||||
3. Check that you can reach each master directly over SSH, not only through the control-plane VIP.
|
||||
4. From your workstation, check the nodes:
|
||||
|
||||
```bash
|
||||
kubectl get nodes
|
||||
```
|
||||
|
||||
**Checkpoint:** all six nodes are `Ready`, and the masters run `v1.36.2+k3s1`.
|
||||
|
||||
5. On **each master**, check etcd and look for existing settings. The last two commands only print file or setting names:
|
||||
|
||||
```bash
|
||||
sudo k3s kubectl get --raw=/readyz/etcd; echo
|
||||
sudo grep -rls 'secrets-encryption' /etc/rancher/k3s/
|
||||
{ systemctl cat k3s; sudo cat /etc/default/k3s /etc/sysconfig/k3s /etc/systemd/system/k3s.service.env 2>/dev/null; } | grep -oE -- '--config|--secrets-encryption|K3S_CONFIG_FILE'
|
||||
```
|
||||
|
||||
**Checkpoint:** each master prints only `ok`. Any other output means etcd has a problem, encryption settings already exist or k3s uses a custom config path.
|
||||
|
||||
## Restarting the masters
|
||||
|
||||
Steps 2 and 4 use this procedure. Restart `k3s-master-1` first, then `k3s-master-2`, then `k3s-master-3`. On each one, run:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart k3s
|
||||
sudo k3s kubectl get --raw=/readyz/etcd; echo
|
||||
sudo k3s kubectl get nodes
|
||||
```
|
||||
|
||||
**Checkpoint:** etcd returns `ok` and all nodes are `Ready` before you restart the next master. The API can take a minute to respond, so rerun the two checks if needed. Finish all 3 restarts without long breaks.
|
||||
|
||||
## 1. Enable encryption and add the settings
|
||||
|
||||
1. On `k3s-master-1`, check the status:
|
||||
|
||||
```bash
|
||||
sudo k3s secrets-encrypt status
|
||||
```
|
||||
|
||||
**Checkpoint:** it shows `Disabled, no configuration file found`.
|
||||
|
||||
2. On `k3s-master-1` **only**, run this. It doesn't create a key or encrypt anything yet:
|
||||
|
||||
```bash
|
||||
sudo k3s secrets-encrypt enable
|
||||
```
|
||||
|
||||
3. On **all 3 masters**, add the settings in a separate file, so the existing config stays unchanged:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /etc/rancher/k3s/config.yaml.d
|
||||
sudo install -m 600 /dev/stdin /etc/rancher/k3s/config.yaml.d/90-secrets-encryption.yaml <<'EOF'
|
||||
secrets-encryption: true
|
||||
secrets-encryption-provider: secretbox
|
||||
EOF
|
||||
```
|
||||
|
||||
## 2. Restart and check the settings
|
||||
|
||||
1. [Restart all 3 masters](#restarting-the-masters).
|
||||
2. On `k3s-master-1`, check the status:
|
||||
|
||||
```bash
|
||||
sudo k3s secrets-encrypt status
|
||||
```
|
||||
|
||||
**Checkpoint:** it shows `Disabled`, stage `start` and `All hashes match`.
|
||||
|
||||
3. From your workstation, check which encryption settings each master uses:
|
||||
|
||||
```bash
|
||||
kubectl get nodes -l node-role.kubernetes.io/control-plane -o json | jq -r '.items[] | .metadata.name + ": " + (.metadata.annotations["k3s.io/node-args"] | fromjson | join(" ") | [scan("--secrets-encryption[^ ]*(?: (?!--)[^ ]+)?")] | join(" "))'
|
||||
```
|
||||
|
||||
**Checkpoint:** all 3 masters show `--secrets-encryption` set to `true` and `--secrets-encryption-provider` set to `secretbox`. **Don't continue without both**, because the next step uses the provider setting to choose the key type.
|
||||
|
||||
## 3. Encrypt the Secrets
|
||||
|
||||
**Don't interrupt this step or restart any masters until it finishes.** A crash could stop the cluster from starting ([k3s issue 13763](https://github.com/k3s-io/k3s/issues/13763)), and we haven't confirmed a fix.
|
||||
|
||||
1. On `k3s-master-1`, run this **once**. It creates the key and re-encrypts the existing Secrets:
|
||||
|
||||
```bash
|
||||
sudo k3s secrets-encrypt rotate-keys
|
||||
```
|
||||
|
||||
2. Check the status until the stage is `reencrypt_finished`:
|
||||
|
||||
```bash
|
||||
sudo k3s secrets-encrypt status
|
||||
```
|
||||
|
||||
If there's an error or no progress, check the logs with `sudo journalctl -u k3s --since '15 min ago'`, then stop. Don't run `rotate-keys` again.
|
||||
|
||||
## 4. Restart and check the status
|
||||
|
||||
1. [Restart all 3 masters](#restarting-the-masters) again.
|
||||
2. On `k3s-master-1`, check the status:
|
||||
|
||||
```bash
|
||||
sudo k3s secrets-encrypt status
|
||||
```
|
||||
|
||||
**Checkpoint:** it shows `Enabled`, `reencrypt_finished`, `All hashes match` and an active `XSalsa20-POLY1305` key.
|
||||
|
||||
## 5. Verify
|
||||
|
||||
1. On **each master**, check that its API can read all Secrets. This doesn't print them:
|
||||
|
||||
```bash
|
||||
sudo k3s kubectl get secrets -A -o name >/dev/null && echo ok
|
||||
```
|
||||
|
||||
**Checkpoint:** each master prints `ok`.
|
||||
|
||||
2. From your workstation, create a test Secret with a fake value:
|
||||
|
||||
```bash
|
||||
kubectl -n default create secret generic encryption-test --from-literal=value=not-a-real-secret
|
||||
```
|
||||
|
||||
3. On `k3s-master-1`, check the test Secret and an existing Secret in etcd. This needs `etcdctl`. If it's missing, install it with `sudo apt install etcd-client`. The command only prints the first 21 characters of each stored value:
|
||||
|
||||
```bash
|
||||
for key in default/encryption-test heimdall/heimdall-tls; do
|
||||
sudo env ETCDCTL_API=3 etcdctl \
|
||||
--endpoints=https://127.0.0.1:2379 \
|
||||
--cacert=/var/lib/rancher/k3s/server/tls/etcd/server-ca.crt \
|
||||
--cert=/var/lib/rancher/k3s/server/tls/etcd/client.crt \
|
||||
--key=/var/lib/rancher/k3s/server/tls/etcd/client.key \
|
||||
get "/registry/secrets/$key" --print-value-only | head -c 21
|
||||
echo
|
||||
done
|
||||
```
|
||||
|
||||
**Checkpoint:** both lines are `k8s:enc:secretbox:v1:`.
|
||||
|
||||
4. From your workstation, delete the test Secret, then check that your apps still work:
|
||||
|
||||
```bash
|
||||
kubectl -n default delete secret encryption-test
|
||||
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded
|
||||
```
|
||||
|
||||
**Checkpoint:** no pods are listed, and the apps work normally.
|
||||
|
||||
## 6. Clean up
|
||||
|
||||
1. Make new VM backups of all 3 masters. Once they finish, delete the older ones, because their Secrets aren't encrypted. The new backups contain both the encrypted data and its key, so keep access restricted.
|
||||
2. On **each master**, take a new etcd snapshot, then list the snapshots:
|
||||
|
||||
```bash
|
||||
sudo k3s etcd-snapshot save --name after-secrets-encryption
|
||||
sudo k3s etcd-snapshot ls
|
||||
```
|
||||
|
||||
3. On the master that holds each snapshot, delete any taken before step 4 finished. Check the name and date first, and delete any copies stored elsewhere too:
|
||||
|
||||
```bash
|
||||
sudo k3s etcd-snapshot delete <snapshot-name>
|
||||
```
|
||||
|
||||
Keep the remaining snapshots separate from the k3s server token. Someone with both can decrypt the Secrets.
|
||||
|
||||
4. Merge the `02` change, then resume deployments. Don't deploy `02`.
|
||||
|
||||
## If something goes wrong
|
||||
|
||||
Stop and save the status output and logs. **Don't restore just one master from a VM backup.** Its old etcd data and encryption settings may not match the other masters. Plan the recovery for all 3 masters together first. Restoring them loses any Kubernetes changes made after the backups and can leave them out of sync with the workers and Longhorn volumes.
|
||||
|
||||
## References
|
||||
|
||||
- [k3s: Turn on Secrets encryption](https://docs.k3s.io/cli/secrets-encrypt)
|
||||
- [k3s: Encryption types](https://docs.k3s.io/security/secrets-encryption)
|
||||
- [k3s: Config files](https://docs.k3s.io/installation/configuration)
|
||||
- [k3s: Snapshots](https://docs.k3s.io/cli/etcd-snapshot)
|
||||
Reference in new issue
Block a user