Redis 基础操作

Redis 命令 管理命令 info: 查看 Redis 当前状态信息 bash 127.0.0.1:6379> info # Server redis_version:3.2.9 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:f0e03a357ae83877 redis_mode:standalone os:Linux 3.10.0-862.el7.x86_64 x86_64 arch_bits:64 multiplexing_api:epoll gcc_version:4.8.5 process_id:2502 run_id:c913615b9c199a0d7ba4454c38e1a65427525c60 tcp_port:6379 uptime_in_seconds:2047 uptime_in_days:0 hz:10 lru_clock:6276784 executable:/usr/local/bin/redis-server config_file:/etc/redis/6379.conf # Clients connected_clients:1 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0 ...(略) # 只查看特定的信息 127.0.0.1:6379> info Memory # Memory used_memory:821088 used_memory_human:801.84K

使用 Prometheus 监控 Kubernetes 集群

部署 Prometheus 准备资源配置清单我们将 prometheus.yml 配置文件以 configmap 的形式存储在 kubernetes 集群中。(configmap.yaml) yaml apiVersion: v1 kind: ConfigMap metadata: name: prometheus-cfg namespace: monitor data: prometheus.yml: | global: scrape_interval: 30s scrape_timeout: 30s evaluation_interval: 1m scrape_configs: -

使用 Traefik-2.4 暴露 Kubernetes 内部 TCP 协议

简单 TCP 服务首先部署一个普通的 mongo 服务,资源清单文件如下所示:(mongo.yaml) yaml apiVersion: apps/v1 kind: Deployment metadata: name: mongo-traefik labels: app: mongo-traefik spec: selector: matchLabels: app: mongo-traefik template: metadata: labels: app: mongo-traefik spec: containers: - name: mongo image: mongo:4.0 ports:

使用 Traefik-2.4 暴露 Kubernetes 内部 Web 服务

部署测试 web 应用使用 Deployment 部署 nginx, 启动两个 pod 实例, 资源配置清单 nginx.yaml 如下: yaml apiVersion: apps/v1 kind: Deployment metadata: labels: app: nginx name: nginx namespace: default spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:stable-alpine --- apiVersion:

部署 Traefik 2.4

Traefik 简介 Traefik 是一个开源的可以使服务发布变得轻松有趣的边缘路由器。它负责接收你系统的请求,然后使用合适的组件来对这些请求进行处理。 除了众多的功能之

docker - 基本操作

docker 安装请参考: – Docker 快速安装 镜像管理 1. 获取镜像 bash # 默认从 dockerhub 拉取最新版本镜像 [root@localhost ~]# docker pull busybox Using default tag: latest latest: Pulling from library/busybox add3ddb21ede: Pull complete Digest: sha256:b82b5740006c1ab823596d2c07f081084ecdb32fd258072707b99f52a3cb8692 Status: Downloaded newer image for busybox:latest # 拉取指定版本的镜像