File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
deployment/terraform/modules/openstack-kubernetes-infra Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -138,21 +138,3 @@ data "openstack_networking_secgroup_v2" "er_https_from_lbs" {
138138 name = " er_https_from_lbs"
139139}
140140
141- resource "null_resource" "copy_kubeconfig" {
142- depends_on = [openstack_compute_instance_v2 . kubernetes_server ]
143-
144- provisioner "local-exec" {
145- # Copy the kubeconfig file from the host to a local file using SCP.
146- # Use ssh-keyscan to prevent interactive prompt on unknown host
147- # Use sed to replace the localhost address in the KUBECONFIG file with the actual IP adddress of the created VM.
148- command = << EOT
149- mkdir -p ${ path . root } /.build/ && \
150- ssh-keyscan -H ${ openstack_compute_instance_v2 . kubernetes_server . access_ip_v4 } >> ${ path . root } /.build/.known_hosts_cogstack && \
151- scp -o UserKnownHostsFile=${ path . root } /.build/.known_hosts_cogstack -o StrictHostKeyChecking=yes \
152- -i ${ local . ssh_keys . private_key_file } \
153- ubuntu@${ openstack_compute_instance_v2 . kubernetes_server . access_ip_v4 } :/etc/rancher/k3s/k3s.yaml \
154- ${ local . kubeconfig_file } && \
155- sed -i "s/127.0.0.1/${ openstack_compute_instance_v2 . kubernetes_server . access_ip_v4 } /" ${ local . kubeconfig_file }
156- EOT
157- }
158- }
You can’t perform that action at this time.
0 commit comments