Skip to content

Commit

Permalink
fix: keep https instead of http (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
devalpatel67 authored Feb 14, 2025
1 parent ea580d1 commit 8bde4c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/service/k3s_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _install_calico_cni(self, ssh_client, task_id: str):
def _update_kubeconfig(self, ssh_client, external_ip: str, task_id: str):
try:
log.info(
f"Updating kubeconfig file to use both internal and external IP addresses..."
f"Updating kubeconfig file to use internal IP address..."
)

kubeconfig_path = "/etc/rancher/k3s/k3s.yaml"
Expand Down Expand Up @@ -242,7 +242,7 @@ def _update_kubeconfig(self, ssh_client, external_ip: str, task_id: str):
clusters:
- cluster:
certificate-authority-data: {ca_data}
server: http://{internal_ip}:6443
server: https://{internal_ip}:6443
name: k3s-cluster
contexts:
- context:
Expand Down Expand Up @@ -287,7 +287,7 @@ def _update_kubeconfig(self, ssh_client, external_ip: str, task_id: str):
log.info("Copied k3s.yaml to ~/.kube/config with correct permissions.")

log.info(
"kubeconfig file updated to use both internal and external IP addresses with a single context."
"kubeconfig file updated to use internal IP address."
)
except Exception as e:
log.error(f"Error updating kubeconfig: {str(e)}")
Expand Down

0 comments on commit 8bde4c6

Please sign in to comment.