docs: use default kubeconfig with k3s context name - #28
Merged
Merged
Conversation
Local access now standardizes on the default kubeconfig (~/.kube/config) with a context named k3s instead of a dedicated per-cluster kubeconfig file. The context name is client-side only; the apiserver authenticates the Dex-issued token's email/groups claims, so this has no cluster or state impact.
OpenTofu TestOpenTofu test passed. View run output |
OpenTofu PlanOpenTofu plan passed. View run outputOpenTofu will perform the following actions:
# module.k3s.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: k3s
local-hostname: k3s
EOT
+ name = "k3s_commoninit"
+ network_config = <<-EOT
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
dhcp4: false
addresses:
- 192.168.102.2/24
EOT
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
# module.runner.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: runner
local-hostname: runner
EOT
+ name = "runner_commoninit"
+ network_config = (sensitive value)
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
Plan: 2 to add, 0 to change, 0 to destroy.
OpenTofu will perform the following actions:
# module.k3s.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: k3s
local-hostname: k3s
EOT
+ name = "k3s_commoninit"
+ network_config = <<-EOT
version: 2
ethernets:
enp1s0:
dhcp4: true
enp2s0:
dhcp4: false
addresses:
- 192.168.102.2/24
EOT
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
# module.runner.libvirt_cloudinit_disk.commoninit will be created
+ resource "libvirt_cloudinit_disk" "commoninit" {
+ id = (known after apply)
+ meta_data = <<-EOT
instance-id: runner
local-hostname: runner
EOT
+ name = "runner_commoninit"
+ network_config = (sensitive value)
+ path = (known after apply)
+ size = (known after apply)
+ user_data = (sensitive value)
}
Plan: 2 to add, 0 to change, 0 to destroy. |
xnoto
added a commit
to makeitworkcloud/kustomize-cluster
that referenced
this pull request
Sep 13, 2026
## What Aligns kubectl onboarding with the pattern shipped in makeitworkcloud/tfroot-libvirt#28: - **`docs/kubeconfig.example.yaml`**: context renamed `makeitworkcloud-k3s` → `k3s`; `current-context` dropped so the file is a safe *merge fragment* (cannot hijack an existing default context). - **`README.md`** `### kubectl access`: replaces the dedicated `~/.kube/makeitworkcloud-k3s.yaml` flow with a flatten-merge into the default `~/.kube/config` (backup + `0600` preserved), and updates verification commands to `--context k3s` / `--context=k3s`. ## Why - One merged context list; no `KUBECONFIG` exports or per-cluster files. - Context name is client-side only — the apiserver authenticates Dex token `email`/`groups` claims. No cluster impact. ## Validation Docs-only; no manifests, Applications, or secrets touched — Argo CD sync scope unaffected. The documented merge and verification commands were executed against a scratch kubeconfig: merge adds `k3s` alongside existing contexts, preserves `current-context`, and resolves `https://api.makeitwork.cloud` + `makeitworkcloud-oidc`. The same flow was applied to a real workstation config and verified with a live `kubectl --context=k3s auth whoami` (Dex OIDC, `makeitworkcloud:admins` group).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Updates the access section of
KUBECTL.md: local kubectl access now standardizes on the default kubeconfig (~/.kube/config) with a context namedk3s, instead of a dedicated per-cluster kubeconfig file.Why
KUBECONFIGjuggling or shell exports.email/groupsclaims (provisioned incloud-init/k3s/cloud_init.cfg), so renaming has no cluster or state impact.Impact
KUBECTL.md; no OpenTofu, cloud-init, or manifest changes. Break-glass and tunnel-recovery sections are unaffected (they concern the node-local admin kubeconfig, not workstation context naming).Follow-up
kustomize-clusterstill documents the old pattern in its README### kubectl accesssection anddocs/kubeconfig.example.yaml(dedicated~/.kube/makeitworkcloud-k3s.yaml, contextmakeitworkcloud-k3s).KUBECTL.mdlinks there for the OIDC flow, so a companion PR is needed to align that repo.