SentryK8S日常运维

228 阅读1分钟

pg数据库满了

1. kubectl get pods
2. kubectl exec -it posnam(例如:websentry-web-5c6c959866-4nqht) -- /bin/bash
3. sentry cleanup  --days 30
4. 

VNC

背景:因安全因素,机器无法直接绑定 EIP,所以无法直接通过 ssh 链接机器。百度云提供了一个控制台服务 VNC,浏览器中可以命令行控制

1. more
2. less

Nginx

Sentry 前置一台 Nginx,有时候需要维护。

  1. whereis nginx 此命令可以查看 nginx位置
  2. vim /etc/nginx/nginx.conf
server{
	client_max_body_size        30m; #文件最大大小
	proxy_connect_timeout    600; #设置超时时间
	proxy_read_timeout       600;
	proxy_send_timeout       600;
	location / {
    	proxy_pass http://xx.xx.xx.xx:9000
    }

}
  1. service nginx restart

  2. 看 Log ,log 地址在 nginx.conf 中,默认地址: /var/log/nginx/access.log