Comments (9)
@liamwh That would be really nice indeed. @kube-hetzner/core FYI.
from terraform-hcloud-kube-hetzner.
You can already do that:
provider "kubernetes" {
host = module.kube_hetzner.kubeconfig_data.host
client_certificate = module.kube_hetzner.kubeconfig_data.client_certificate
client_key = module.kube_hetzner.kubeconfig_data.client_key
cluster_ca_certificate = module.kube_hetzner.kubeconfig_data.cluster_ca_certificate
ignore_annotations = [
".*cattle\\.io.*",
]
ignore_labels = [
".*cattle\\.io.*",
]
}
And I did that for a while, before concluding that is was an unstable situation. Occasionally, the provider would want to initialize before the cluster was built, so I would be stuck with a terraform state that would refuse to build the cluster because not all providers were fully configured.
I ended up separating my cluster configuration in three "independent" terraform folders, with each their own state, and I run them in a sequence.
- (cluster) kube.tf
- (core infra on cluster) with the kubeconfig.yaml from 1., setup longhorn, hashicorp vault, service mesh, etc.
- (applications) with the configured terraform vault provider (only possible after finalizing step 2), setup all applications with need for vault, etc.
So you can do it, and I concluded it was not the best solution. Your milage might vary...
from terraform-hcloud-kube-hetzner.
I am getting this error often, any idea what I can do about it?
module.kube-hetzner.data.remote_file.kubeconfig: Refreshing...
module.kube-hetzner.null_resource.kustomization: Refreshing state... [id=1680158679973432701]
module.kube-hetzner.null_resource.configure_autoscaler[0]: Refreshing state... [id=4638238659851963355]
module.kube-hetzner.null_resource.configure_floating_ip["3-0-egress"]: Refreshing state... [id=4273720719089111240]
module.kube-hetzner.data.remote_file.kubeconfig: Refresh complete after 4s [id=88.99.36.56:22:/etc/rancher/k3s/k3s.yaml]
module.kube-hetzner.local_sensitive_file.kubeconfig[0]: Refreshing state... [id=b6cb6f78b4f1a23598db3e2f8de60b983224b5c3]
╷
│ Error: Kubernetes cluster unreachable: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
│
│
╵
Operation failed: failed running terraform plan (exit 1)
from terraform-hcloud-kube-hetzner.
It would be great to have access to many more things via outputs. Also the node pools. While playing around to optimize my longhorn volumes issue (#1195) I added this to the outputs for example. So I can add volumes to nodes in the custom way I would like to do it.
# added at the end of /output.tf
output "control_planes" {
value = module.control_planes
description = "All control plane items"
}
output "agents" {
value = module.agents
description = "All agent items"
}
And yes, I understand that I can break a lot of stuff with that freedom ;)
from terraform-hcloud-kube-hetzner.
@andi0b Looking good, PR most welcome!
I have to look into it again, this only exposes the values from the host tf-submodule, I think it should also expose more information, also things from the main TF module, and maybe merged with the node pool input variables.
I've seen that there is a bigger re-factor planned for the next version (more submodules), it might be better to wait for this to be completed. To not implement something now that will soon lead to a breaking change. Do you have an estimation when this refactoring will be finished?
from terraform-hcloud-kube-hetzner.
Amazing, will give this a go and report back, thank you very much!
from terraform-hcloud-kube-hetzner.
@liamwh Did you sort this out? Either way, could you share your the code you use to do that please (without sensitive values of course). It would be greatly appreciated.
from terraform-hcloud-kube-hetzner.
@andi0b Looking good, PR most welcome!
from terraform-hcloud-kube-hetzner.
@andi0b You are absolutely right, best to wait for v3. @aleksasiriski is leading the push to v3, we do not have a time estimate yet, but it will come soon enough. We will keep this FR in mind and slip it in if we can.
from terraform-hcloud-kube-hetzner.
Related Issues (20)
- [Bug]: /etc/cloud/rename_interface.sh: No such file or directory HOT 7
- [Bug]: helm releases keep installing after disabling them in kube.tf HOT 3
- [Bug]: Terraform does not deploy well HOT 2
- Allow patching default Helm values HOT 1
- Unknown connection HOT 1
- [Bug]: Scaling to 0 Second CP Nodepool HOT 1
- [Feature Request]: Make kubeconfig_server_address configurable HOT 1
- [Bug]: Traefik fails after automatic self-restart because of missing CRD HOT 4
- [Bug]: the default `traefik_redirect_to_https=true` does not seem to work any longer after traefik updated to 3.0.x HOT 3
- [Bug]: HOT 1
- [Feature Request]: add support of missing s3 options (--etcd-s3-folder) HOT 1
- [Bug]: swap_size is not working as expected
- [Bug]: ETCD S3 BackUp doesn't work due to URI issues HOT 1
- [Bug]: terraform apply fails to wait for MicroOS to become available HOT 1
- [Bug]: loadbalancer is not deployed when using autoscaling group with minimum 0 HOT 1
- [Bug]: cert-manager CRDs not available when using k3s-channel 1.30 HOT 2
- [Feature Request]: Configure all HelmChart deployments with version HOT 1
- [Feature Request]: Enable configuration of "bootstrap" argument for HelmCharts
- [Feature Request]: Use helmchart deployment for hetzner csi-driver
- [Bug]: using most recent autoscaler 1.30.2 fails HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-hcloud-kube-hetzner.