feat: Complete nginx-nodeport implementation with comprehensive documentation and security improvements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user