apiVersion: v1 kind: ConfigMap metadata: name: html-template data: index.html: | What is my IP address? — {{ .Host }}

What is my IP address?

{{ .IP }}

{{ if .Country }}

Country lookup

    $ http {{ .Host }}/country
    {{ .Country }}

    $ http {{ .Host }}/country-iso
    {{ .CountryISO }}
{{ end }} {{ if .City }}

City lookup

    $ http {{ .Host }}/city
    {{ .City }}
{{ end }} {{ if .ASN }}

ASN lookup

    $ http {{ .Host }}/asn
    {{ .ASN }}
    {{ if .ASNOrg }}

Looks like you're with {{ .ASNOrg }}

{{ end }} {{ end }}

JSON output

    $ http {{ .Host }}/json
    {{ .JSON }}
{{ if .Port }}

All endpoints

    {{ .Host }}
    {{ .Host }}/ip
    {{ .Host }}/json
    {{ .Host }}/country
    {{ .Host }}/country-iso
    {{ .Host }}/city
    {{ .Host }}/asn
    {{ .Host }}/coordinates
    {{ .Host }}/port/$number
            
{{ end }}
{{ if .City }}

Map

{{ end }}

FAQ

Why is IPv6 not supported?

This service runs on k3s which currently doesn't support IPv6. see:

{{ if or .Country .City .ASN .ASNOrg }}
{{ end }}