After the cluster is created, I want to continue the deployment, but I cannot read the Kubeconfig file properly. How can i fix that inside me website? by the way, I connect my cluster with .kubeconfig file. But terraform cannot.
'config_path' refers to an invalid path: ".kubeconfig": stat .kubeconfig: no such file or directory
Error: Failed to create deployment: Post "http://localhost/apis/apps/v1/namespaces/default/deployments": dial tcp 127.0.0.1:80: connect: connection refused
deployment.tf
resource "kubernetes_deployment" "nginx_deployment" {
provider = kubernetes.kb
...
...
}
provider.tf
terraform {
required_providers {
ovh = {
source = "ovh/ovh"
version = "0.16.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.8.0"
}
local = {
source = "hashicorp/local"
version = "2.1.0"
}
}
}
# Configure the OVHcloud Provider
provider "ovh" {
endpoint = "ovh-ca"
application_key = ""
application_secret = ""
consumer_key = ""
}
provider "kubernetes" {
alias = "kb"
# load_config_file = "false"
config_path = ".kubeconfig"
}
provider "local" {
#comment
}
resource "local_file" "kubeconfig" {
content = ovh_cloud_project_kube.my_kube_cluster.kubeconfig
filename = ".kubeconfig"
}
Terraform kubeconfig issue
Related questions
- IPv6 subnet/extra IPv6 IPs on cloud instances/VPS
3908
31.01.2018 07:31
- Problem with Windows Server 2019 activation
3763
30.12.2020 04:04
- Is the Plesk License included?
3611
02.01.2018 11:56
- Ubuntu 20.04 image in OVH has been marked as DEPECRATED
2383
04.12.2020 23:28
- Automatic Block storage backup - how?
2045
06.05.2020 17:31
- Private Network shared between two or more Public Cloud projects
1988
11.03.2021 13:19
- CORS in Object Storage
1838
03.11.2020 06:02
- [ALPHA] On-demand bare metal instances in Public Cloud
1825
14.05.2019 07:08
- Error has occurred creating your Public Cloud project
1755
08.10.2021 08:52
- Nested virtual machines
1516
18.10.2018 14:33