kube transfer to single-node host

This commit is contained in:
2024-07-08 10:39:56 -04:00
parent d1afa569cc
commit 887df21477
69 changed files with 1675 additions and 2009 deletions

View File

@@ -1,6 +1,14 @@
# DDNS Service
Since we occasionally need an ipv4 address we'll make one.
This creates and keeps updated `ipv4.reeselink.com`.
This requires the aws cli to be installed on each node with credentials that can modify
records in route53.
<https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html>
```bash
ansible-playbook -i ansible/inventory.yaml ddns/install_ddns.yaml
```

View File

@@ -1,5 +1,5 @@
[Unit]
Description=Updates the {{ fqdn }} and *.{{ fqdn }} record with the current public IPV4 address
Description=Updates the {{ fqdn }} record with the current public IPV4 address
[Service]
ExecStart=/usr/local/scripts/ddns.sh

View File

@@ -5,7 +5,8 @@ PUBLIC_IP=$(curl -4 ifconfig.me)
# Update *.{{ fqdn }} and {{ fqdn }}
cat /etc/ddns/record_template.json \
| jq '.Changes[0].ResourceRecordSet.ResourceRecords[0].Value = "'$PUBLIC_IP'"' \
| jq '.Changes[1].ResourceRecordSet.ResourceRecords[0].Value = "'$PUBLIC_IP'"' \
> /etc/ddns/record.json
# aws cli to update a record
aws route53 change-resource-record-sets --hosted-zone-id {{ hosted_zone_id }} --change-batch file:///etc/ddns/record.json
PUBLIC_IPV6=$(dig -t aaaa +short myip.opendns.com @resolver1.opendns.com)

View File

@@ -1,19 +1,6 @@
{
"Comment": "Update Public IPV4 Address",
"Changes": [
{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "*.{{ fqdn }}.",
"Type": "A",
"TTL": 300,
"ResourceRecords": [
{
"Value": ""
}
]
}
},
{
"Action": "UPSERT",
"ResourceRecordSet": {

View File

@@ -1,2 +1,2 @@
hosted_zone_id: Z012820733346FJ0U4FUF
fqdn: reeseapps.com
hosted_zone_id: Z0092652G7L97DSINN18
fqdn: ipv4.reeselink.com