Skip to content

Commit fe7c287

Browse files
authored
feat: Upgrade default kubernetes version to 1.25 (#32)
1 parent 26aa027 commit fe7c287

File tree

7 files changed

+291
-251
lines changed

7 files changed

+291
-251
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module "k8s" {
4141
worker_server_type = "cx31"
4242
worker_count = 2
4343
44-
kubernetes_version = "1.24.0"
44+
kubernetes_version = "1.25.0"
4545
}
4646
4747
output "kubeconfig" {
@@ -61,9 +61,9 @@ and check the access by viewing the created cluster nodes:
6161
```cmd
6262
$ kubectl get nodes --kubeconfig=kubeconfig.conf
6363
NAME STATUS ROLES AGE VERSION
64-
k8s-master-0 Ready control-plane 31m v1.24.0
65-
k8s-worker-0 Ready <none> 31m v1.24.0
66-
k8s-worker-1 Ready <none> 31m v1.24.0
64+
k8s-master-0 Ready control-plane 31m v1.25.0
65+
k8s-worker-0 Ready <none> 31m v1.25.0
66+
k8s-worker-1 Ready <none> 31m v1.25.0
6767
```
6868

6969
## Supported base images
@@ -137,7 +137,7 @@ module "k8s" {
137137
version = "1.0.1"
138138
139139
...
140-
140+
141141
kubeadm_host = "<ip address of another master node>"
142142
}
143143
```
@@ -157,7 +157,7 @@ TLS certificate credentials form the output can be used to chain other Terraform
157157
158158
provider "kubernetes" {
159159
host = module.k8s.apiserver_url
160-
160+
161161
# For a single-master cluster, this will be an IPv6 URL. For IPv4, this can
162162
# also be used
163163
# host = "https://${module.k8s.masters[0].ipv4_address}:6443"
@@ -203,6 +203,6 @@ In addition some caveats for dual-stack clusters in general:
203203
- the apiserver Service (`kubernetes.default.svc.cluster.local`) has to be single-stack, as `--apiserver-advertise-address` does not support dual-stack yet. The default address family for the cluster can be selected with `primary_ip_family` variable (defaults to `ipv6`).
204204

205205

206-
## Acknowledgements
206+
## Acknowledgements
207207

208208
Some parts, including this README, adapted from [JWDobken/terraform-hcloud-kubernetes](https://github.com/JWDobken/terraform-hcloud-kubernetes) by Joost Döbken.

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
source = "hetznercloud/hcloud"
55
version = "~> 1.31"
66
}
7-
template = {
7+
cloudinit = {
88
source = "hashicorp/cloudinit"
99
version = "2.2.0"
1010
}

scripts/install-addons.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,4 @@ else
1717
fi
1818

1919
kubectl apply -f hetzner_ccm.yaml
20-
21-
# Install storage provider
22-
kubectl -n kube-system create secret generic hcloud-csi \
23-
--from-literal=token="$HCLOUD_TOKEN" \
24-
-o yaml --dry-run=client | kubectl apply -f-
2520
kubectl apply -f hetzner_csi.yaml

templates/hetzner_ccm.yaml.tpl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,24 @@ spec:
5151
# cloud controller manages should be able to run on masters
5252
- key: "node-role.kubernetes.io/master"
5353
effect: NoSchedule
54-
operator: Exists
54+
operator: Exists
5555
- key: "node-role.kubernetes.io/control-plane"
5656
effect: NoSchedule
57-
operator: Exists
57+
operator: Exists
5858
- key: "node.kubernetes.io/not-ready"
5959
effect: "NoSchedule"
6060
containers:
61-
- image: hetznercloud/hcloud-cloud-controller-manager:v1.12.1
61+
- image: hetznercloud/hcloud-cloud-controller-manager:v1.13.0
6262
name: hcloud-cloud-controller-manager
6363
command:
6464
- "/bin/hcloud-cloud-controller-manager"
6565
- "--cloud-provider=hcloud"
6666
- "--leader-elect=false"
6767
- "--allow-untagged-cloud"
68-
%{ if use_hcloud_network ~}
68+
%{ if use_hcloud_network ~}
6969
- "--allocate-node-cidrs=true"
7070
- "--cluster-cidr=${pod_cidr_ipv4}"
71-
%{ endif ~}
71+
%{ endif ~}
7272
resources:
7373
requests:
7474
cpu: 100m
@@ -83,12 +83,13 @@ spec:
8383
secretKeyRef:
8484
name: hcloud
8585
key: token
86-
%{ if use_hcloud_network ~}
86+
%{ if use_hcloud_network ~}
8787
- name: HCLOUD_NETWORK
8888
valueFrom:
8989
secretKeyRef:
9090
name: hcloud
9191
key: network
9292
%{ endif ~}
9393
- name: HCLOUD_INSTANCES_ADDRESS_FAMILY
94-
value: dualstack
94+
value: dualstack
95+
priorityClassName: system-cluster-critical

0 commit comments

Comments
 (0)