diff --git a/.gitignore b/.gitignore index 3694c05..d7646da 100644 --- a/.gitignore +++ b/.gitignore @@ -74,8 +74,11 @@ my-app/ my-project/ test-app/ demo-*/ -examples/my-*/ -examples/test-*/ + +# Allow nginx-mycelium example files to be tracked +!examples/nginx-mycelium/*.yaml +!examples/nginx-mycelium/*.md +!examples/nginx-mycelium/*.sh # Development and Testing .nohup.out diff --git a/examples/nginx-mycelium/nginx-mycelium.md b/examples/nginx-mycelium/nginx-mycelium.md index 8a3ec13..18799e3 100644 --- a/examples/nginx-mycelium/nginx-mycelium.md +++ b/examples/nginx-mycelium/nginx-mycelium.md @@ -29,9 +29,8 @@ kubectl apply -f mycelium-website-hostnetwork.yaml kubectl wait --for=condition=ready pod -l app=mycelium-website --timeout=60s # 3. Get the IPv6 address of the pod -POD_IP=$(kubectl get pod -l app=mycelium-website -o jsonpath='{.items[0].status.podIP}') -NODE_IP=$(kubectl get pod -l app=mycelium-website -o jsonpath='{.items[0].spec.nodeName}') -MYCELIUM_IP=$(kubectl get node $NODE_IP -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}') +NODE_NAME=$(kubectl get pod -l app=mycelium-website -o jsonpath='{.items[0].spec.nodeName}') +MYCELIUM_IP=$(kubectl get node $NODE_NAME -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}') echo "Website accessible at: http://[$MYCELIUM_IP]:80" @@ -41,6 +40,21 @@ curl http://[476:c4f:b4cb:7205:ff0f:f56e:abea:6905]:80 curl http://[552:5984:2d97:72dc:ff0f:39ef:6ec:a48c]:80 ``` +**🔄 Optional: Update Content with Dynamic IPv6 Discovery** + +The `update-content.sh` script can be used to regenerate content with current IPv6 addresses: + +```bash +# Run to update content with current cluster IPv6 addresses +./update-content.sh + +# This will: +# 1. Discover current Mycelium IPv6 addresses +# 2. Regenerate website content with IPv6 information +# 3. Update the ConfigMap with new content +# 4. Trigger pod update with new content +``` + ## 🌍 Global Access URLs Once deployed, your website is **globally accessible** at all Mycelium IPv6 addresses on port 80: