fix(deploy): add sudo to kubectl apply command for proper permissions

The deploy-server target was failing due to insufficient permissions on the remote server. Adding sudo ensures kubectl can apply the deployment configuration.
This commit is contained in:
Jp
2026-02-26 11:27:10 +08:00
parent 07748a7025
commit 02dbea230c

View File

@@ -27,7 +27,7 @@ deploy-server:
@cat k8s/deployment.yaml >> /tmp/server_deploy.yaml
@# Single SCP/SSH call to reduce password prompts
scp /tmp/server_deploy.yaml $(SERVER_USER)@$(SERVER_IP):/tmp/server_deploy.yaml
ssh $(SERVER_USER)@$(SERVER_IP) "kubectl apply -f /tmp/server_deploy.yaml && rm /tmp/server_deploy.yaml"
ssh $(SERVER_USER)@$(SERVER_IP) "sudo kubectl apply -f /tmp/server_deploy.yaml && rm /tmp/server_deploy.yaml"
@rm /tmp/server_deploy.yaml
stop: