fix_user_service.sh
510 Bytes
# 为 user-service 禁用 Actuator 安全
kubectl patch deployment user-service -n ecommerce -p '{
"spec": {
"template": {
"spec": {
"containers": [{
"name": "user-service",
"env": [
{"name": "MANAGEMENT_SECURITY_ENABLED", "value": "false"},
{"name": "MANAGEMENT_ENDPOINT_HEALTH_ACCESS", "value": "permit-all"},
{"name": "SPRING_SECURITY_IGNORED", "value": "/actuator/**,/api/actuator/**"}
]
}]
}
}
}
}'