feat: Complete nginx-nodeport implementation with comprehensive documentation and security improvements

This commit is contained in:
mik-tf
2025-11-06 20:36:59 -05:00
parent d293c00794
commit 2028fc87ff
6 changed files with 948 additions and 25 deletions

View File

@@ -101,16 +101,21 @@ fi
# Get service information
print_info "Checking NodePort service..."
SERVICE_INFO=$(kubectl get svc nginx-nodeport-service -o yaml)
if echo "$SERVICE_INFO" | grep -q "type: NodePort"; then
print_status "NodePort service is configured"
SERVICE_TYPE=$(kubectl get svc nginx-nodeport-service -o jsonpath='{.spec.type}')
if [ "$SERVICE_TYPE" = "NodePort" ]; then
print_status "NodePort service is configured correctly"
else
print_error "NodePort service not properly configured"
print_error "Service type is '$SERVICE_TYPE', expected 'NodePort'"
exit 1
fi
# Extract NodePort
NODEPORT=$(kubectl get svc nginx-nodeport-service -o jsonpath='{.spec.ports[0].nodePort}')
if [ "$NODEPORT" = "30091" ]; then
print_status "NodePort is correctly set to 30091"
else
print_warning "NodePort is $NODEPORT (expected 30091)"
fi
print_info "NodePort: $NODEPORT"
# Get node IPv6 address