Skip to content

Commit

Permalink
Merge pull request #9 from microsoft/update-output-to-k3s-default
Browse files Browse the repository at this point in the history
Generate KUBECONFIG in default k3s location
  • Loading branch information
bradarm authored Jul 18, 2024
2 parents 0e434ec + e19c76d commit 0560180
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .devcontainer/features/k3s-on-host/updateContent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ function gen_kubeconfig_for_devcontainer() {
${kubeconfig}
UPDATE_END" --disable_log

# Write the local kubeconfig to the default location in the devcontainer
[[ ! -d "/etc/rancher/k3s" ]] && run_a_script "mkdir -p /etc/rancher/k3s" --disable_log

run_a_script "tee /etc/rancher/k3s/k3s.yaml > /dev/null << UPDATE_END
${kubeconfig}
UPDATE_END" --disable_log


info_log "Generated '$KUBECONFIG'."
info_log "END: ${FUNCNAME[0]}"

Expand Down

0 comments on commit 0560180

Please sign in to comment.