k8s学习笔记-暴露服务--暴露服务踩坑排错

2023-05-16

deployment 部署和调度的工具(组件)

[root@k8s2 docker]# kubectl create deployment kubernets-bootcamp --image=gcr.io/google-samples/kubernets-bootcamp:v1 
deployment.apps/kubernets-bootcamp created

#deployment:是一个部署安装容器的一个工具
#kubernets-bootcamp:部署任务的名字
#--image=gcr.io/google-samples/kubernets-bootcamp:v1 :部署的容器需要跑的镜像

查看

[root@k8s2 docker]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
kubernets-bootcamp   0/1     1            0           114s
[root@k8s2 docker]# 

给点时间去拉取镜像起容器

[root@k8s2 docker]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
kubernets-bootcamp   0/1     1            0           114s
[root@k8s2 docker]# kubectl create deployment k8s-nginx --image=nginx
deployment.apps/k8s-nginx created
[root@k8s2 docker]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-nginx            0/1     1            0           24s
kubernets-bootcamp   0/1     1            0           3m51s
[root@k8s2 docker]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-nginx            1/1     1            1           50s
kubernets-bootcamp   0/1     1            0           4m17s
[root@k8s2 docker]# kubectl create deployment k8s-redis --image=redis
deployment.apps/k8s-redis created
[root@k8s2 docker]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-nginx            1/1     1            1           87s
k8s-redis            0/1     1            0           3s
kubernets-bootcamp   0/1     1            0           4m54s
[root@k8s2 docker]# 

[root@k8s2 docker]# kubectl get pod
NAME                                  READY   STATUS             RESTARTS   AGE
k8s-nginx-6ff5777d4b-vsgdf            1/1     Running            0          2m37s
k8s-redis-8488dc6f89-z9cgx            1/1     Running            0          73s
kubernets-bootcamp-6658b5b79b-cdq9m   0/1     ImagePullBackOff   0          6m4s

删除deployment

[root@k8s2 docker]# kubectl delete deployment k8s-nginx
deployment.extensions "k8s-nginx" delete

一次起三个deployment

[root@k8s2 docker]# kubectl create deployment k8s-nginx --image=nginx -r 3
deployment.apps/k8s-nginx created
[root@k8s2 docker]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-nginx            1/3     3            1           8s
k8s-redis            1/1     1            1           5m39s
kubernets-bootcamp   0/1     1            0           10m
[root@k8s2 docker]# 

5.16

shell里的export ,将变量输出为一个全局变量,在子shell里可以用

[root@localhost ~]# sg='yy'
[root@localhost ~]# echo sg
sg
[root@localhost ~]# bash
[root@localhost ~]# echo sg
sg
[root@localhost ~]# echo $sg

[root@localhost ~]# exit 
exit
[root@localhost ~]# echo $sg
yy
[root@localhost ~]# export sg
[root@localhost ~]# echo #sg

[root@localhost ~]# bash
[root@localhost ~]# echo $sg
yy
[root@localhost ~]# 

查看日志

[root@localhost ~]# kubectl get pod
NAME                                  READY   STATUS         RESTARTS   AGE
k8s-nginx-6ff5777d4b-99bnj            1/1     Running        1          24h
k8s-nginx-6ff5777d4b-hsqzs            1/1     Running        1          24h
k8s-nginx-6ff5777d4b-swl2r            1/1     Running        1          24h
k8s-redis-8488dc6f89-z9cgx            1/1     Running        1          24h
kubernets-bootcamp-6658b5b79b-cdq9m   0/1     ErrImagePull   0          24h
[root@localhost ~]# kubectl logs k8s-nginx-6ff5777d4b-99bnj  
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
[root@localhost ~]# 

服务暴露

1.将pod暴露给外部通信
2.跨多个pod的负载均衡
3.虽然每个pod都有一个唯一的IP地址,但如果没有service,这些ip不会暴露在集群外部。service允许你的应用程序接收流量。service也可以用在ServiceSpec标记type的方式暴露

1.cluster(默认)-在集群的内部IP上公开service.这种类型使得service只能从集群内访问。
2.nodeport 使用nat在集群中每个每个选定node的相同端口上公开service。使用:从集群外部访问service,是cluster的超集
3.Load Balancer 在当前云中创建一个外部负载均衡器(如果支持的话),并为service分配一个固定IP.是NodePort的超集
4.ExternalName 通过返回带有该名称的CNAME记录,使用任意名称(由spec中的externalname指定)公开service。不使用代理。这种类型需要kube-dns的v1.7或更高版本。

别名记录:
nslookup:通过dns域名解析

yum install bind-utils -y
[root@localhost ~]# nslookup www.taobao.com
Server:		114.114.114.114
Address:	114.114.114.114#53

Non-authoritative answer:
www.taobao.com	canonical name = www.taobao.com.danuoyi.tbcache.com.
Name:	www.taobao.com.danuoyi.tbcache.com
Address: 113.96.109.100
Name:	www.taobao.com.danuoyi.tbcache.com
Address: 113.96.109.101
Name:	www.taobao.com.danuoyi.tbcache.com
Address: 240e:d9:a003:1400:3::3f9
Name:	www.taobao.com.danuoyi.tbcache.com
Address: 240e:d9:a003:1400:3::3fa

2021.5.17

暴露服务流程

1.创建pod

[root@localhost ~]# kubectl get service
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   2d6h
2.创建服务类型为cluster(!!!!踩坑开始)

[root@localhost ~]# kubectl expose deployment/sc-k8s-nginx --type='NodePort' --port 8080
service/sc-k8s-nginx exposed
[root@localhost ~]# kubectl get service
NAME           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP          2d6h
sc-k8s-nginx   NodePort    10.101.216.124   <none>        8080:31463/TCP   11s
[root@localhost ~]# 

查看服务详细信息
[root@localhost ~]# kubectl describe service sc-k8s-nginx
Name:                     sc-k8s-nginx
Namespace:                default
Labels:                   app=sc-k8s-nginx
Annotations:              <none>
Selector:                 app=sc-k8s-nginx
Type:                     NodePort
IP Families:              <none>
IP:                       10.101.216.124
IPs:                      <none>
Port:                     <unset>  8080/TCP
TargetPort:               8080/TCP
NodePort:                 <unset>  31463/TCP
Endpoints:                172.17.0.3:8080,172.17.0.7:8080,172.17.0.8:8080
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>

访问192.168.2.120:8080 失败(k8s nodeport访问不了)
原因:
起容器的时候映射有问题,容器打开的端口不是8080,镜像里面的dockerflie里面的端口是80,必须保持一致
[root@localhost ~]# kubectl expose deployment/sc-k8s-nginx --type='NodePort' --port 8080
填坑开始:
1.删除服务,重新起容器不设置端口,使用默认的端口
删除:
[root@localhost ~]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-redis            1/1     1            1           2d6h
kubernets-bootcamp   0/1     1            0           2d6h
sc-k8s-nginx         3/3     3            3           28m
[root@localhost ~]# kubectl delete deployment sc-k8s-nginx
deployment.extensions "sc-k8s-nginx" deleted
[root@localhost ~]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-redis            1/1     1            1           2d6h
kubernets-bootcamp   0/1     1            0           2d6h

新启:
[root@localhost ~]# kubectl create deployment sc-k8s-nginx -r 3 --image=nginx
deployment.apps/sc-k8s-nginx created
[root@localhost ~]# kubectl get deployment
NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
k8s-redis            1/1     1            1           2d6h
kubernets-bootcamp   0/1     1            0           2d6h
sc-k8s-nginx         3/3     3            3           13s

暴露服务:
先删除之前错的
[root@localhost ~]# kubectl get service
NAME           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP          2d6h
sc-k8s-nginx   NodePort    10.101.216.124   <none>        8080:31463/TCP   30m
[root@localhost ~]# kubectl delete service sc-k8s-nginx
service "sc-k8s-nginx" deleted
[root@localhost ~]# kubectl expose deployment sc-k8s-nginx --type='NodePort' --port 80
service/sc-k8s-nginx exposed
[root@localhost ~]# kubectl get service
NAME           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes     ClusterIP   10.96.0.1       <none>        443/TCP        2d6h
sc-k8s-nginx   NodePort    10.106.254.29   <none>        80:30774/TCP   9s
[root@localhost ~]# 
[root@localhost ~]# kubectl describe service sc-k8s-nginx
Name:                     sc-k8s-nginx
Namespace:                default
Labels:                   app=sc-k8s-nginx
Annotations:              <none>
Selector:                 app=sc-k8s-nginx
Type:                     NodePort
IP Families:              <none>
IP:                       10.106.254.29
IPs:                      <none>
Port:                     <unset>  80/TCP
TargetPort:               80/TCP
NodePort:                 <unset>  30774/TCP
Endpoints:                172.17.0.3:80,172.17.0.7:80,172.17.0.8:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>


本机上curl访问成功,但网页上仍然访问不了:
[root@localhost ~]# curl 192.168.2.120:30774
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@localhost ~]# 

2.继续排错:
iptables forward链默认是drop,修改成accept
[root@localhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
KUBE-FIREWALL  all  --  anywhere             anywhere            

Chain FORWARD (policy DROP)
target     prot opt source               destination         
DOCKER-USER  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
KUBE-FIREWALL  all  --  anywhere             anywhere            

Chain DOCKER (1 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination         
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-USER (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain KUBE-FIREWALL (2 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere             /* kubernetes firewall for dropping marked packets */ mark match 0x8000/0x8000
# Warning: iptables-legacy tables present, use iptables-legacy to see them
[root@localhost ~]# 


#修改iptables forwardl链为accept
[root@localhost ~]# iptables -P FORWARD ACCEPT
[root@localhost ~]# iptable -L
-bash: iptable: 未找到命令
[root@localhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
KUBE-FIREWALL  all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
DOCKER-USER  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
KUBE-FIREWALL  all  --  anywhere             anywhere            

Chain DOCKER (1 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination         
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-USER (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain KUBE-FIREWALL (2 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere             /* kubernetes firewall for dropping marked packets */ mark match 0x8000/0x8000
# Warning: iptables-legacy tables present, use iptables-legacy to see them
[root@localhost ~]# 

#访问成功!!

#查看iptables 每条链捕捉到多少条数据
[root@localhost ~]# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 329K   55M KUBE-FIREWALL  all  --  any    any     anywhere             anywhere            

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
  102  7304 DOCKER-USER  all  --  any    any     anywhere             anywhere            
  102  7304 DOCKER-ISOLATION-STAGE-1  all  --  any    any     anywhere             anywhere            
   12  1462 ACCEPT     all  --  any    docker0  anywhere             anywhere             ctstate RELATED,ESTABLISHED
   47  2444 DOCKER     all  --  any    docker0  anywhere             anywhere            
   43  3398 ACCEPT     all  --  docker0 !docker0  anywhere             anywhere            
    0     0 ACCEPT     all  --  docker0 docker0  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 328K   59M KUBE-FIREWALL  all  --  any    any     anywhere             anywhere            

Chain DOCKER (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   43  3398 DOCKER-ISOLATION-STAGE-2  all  --  docker0 !docker0  anywhere             anywhere            
  102  7304 RETURN     all  --  any    any     anywhere             anywhere            

Chain DOCKER-USER (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  102  7304 RETURN     all  --  any    any     anywhere             anywhere            

Chain DOCKER-ISOLATION-STAGE-2 (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       all  --  any    docker0  anywhere             anywhere            
   43  3398 RETURN     all  --  any    any     anywhere             anywhere            

Chain KUBE-FIREWALL (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       all  --  any    any     anywhere             anywhere             /* kubernetes firewall for dropping marked packets */ mark match 0x8000/0x8000
# Warning: iptables-legacy tables present, use iptables-legacy to see them
[root@localhost ~]# 
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

k8s学习笔记-暴露服务--暴露服务踩坑排错 的相关文章

  • TCP 服务器程序突然中断 由于send函数导致

    最近在写tcp 客户端服务器操作 设置服务器为单线程多个客户端连入 开发过程中出现 服务器代码运行过程中 在send处突然中断情况 通过GDB调试发现send函数报错提示打开文件错误 由于测试过程纵单节点反复连入客户端 在client so
  • 我为什么选择Linux mint 21.1 “Vera“ ? Mint安装优化调教指南(分辨率DPI、主题美化)

    前言 xff1a 为什么是Mint 笔者算是Linux老用户了 xff0c 作为一个后端开发 xff0c 尝试了多种不同发行版 一开始是Manjaro这种Arch系 xff0c 但是其对于开发而言实在是太过不稳定 xff1b 每次滚动更新都
  • 常用主题建模方法简单对比LSA&PLSA&LDA&HDP

    几种常用的主题建模方法 潜在语义分析 LSA I 概率潜在语义分析 PLSA 潜在狄利克雷分布 LDA 层次狄利克雷过程 HDP LSA I存在的主要问题 SVD计算非常耗时 xff0c 尤其文本处理 xff0c 词和文本数都是非常大的 x
  • banner2.1新版的使用,图片加载方法

    新版banner没有了设置图片和加载图片的方法 xff0c 弄了好几天才发现要设置适配器才可以使用 使用banner setaAapter方法设置适配器 xff0c 里面创建一个匿名内部类 xff0c 然后继承BannerImageAdap
  • yum解决依赖问题巧用

    1 使用yum查找软件需要用到的依赖包 xff0c 需要使用的命令是 xff1a yum deplist 34 要查找的软件 34 例如要查找 安装 redis 需要 的依赖软件有哪些 xff1a yum deplist redis 2 假
  • ubuntu linux 下载的deb包存放位置

    var cache apt archives
  • VMware快捷启动虚拟机+开机自启动

    场景 需要快速启动vm中的虚拟机服务 实现 编写bat文件 xff08 新建txt文件写完改成 bat文件即可 xff09 span class token string 34 D Dev tools VMware span class t
  • Zookeeper思维导图

  • cnpminstall报错:Connecttimeoutfor5000ms踩坑

    问题 xff1a 安装Head插件 xff0c 执行cnpm install 报错 xff0c 报错如下 xff1a Get binary mirror config latest from https registry npm taoba
  • 解决执行grunt命令报错【Cannot find module 'coffeescript/register'】

    在使用grunt的插件执行grunt命令时报错 xff1a 如图 xff1a 报错信息 xff1a Cannot find module 39 coffeescript register 39 解决办法 xff1a 1 xff1a 删除项目
  • Linux命令(1)

    1 判断一个命令的类型 type xff1a 格式 xff1a type xff08 一个空格 xff09 命令 作用 xff1a 判断该类型是内部还是外部命令 还可以显示该命令文件路径 2 查看一个文件的类型 file 格式 xff1a
  • 关于单链表的理解

    链表是一种物理 存储单元上非连续 非顺序的 存储结构 xff0c 数据元素的逻辑顺序是通过链表中的 指针链接次序实现的 链表由一系列结点 xff08 链表中每一个元素称为结点 xff09 组成 xff0c 结点可以在运行时动态生成 每个结点
  • selinux is active unexpected inconsistency RUN fsck MANUALLY

    启动centos6 5时报错 xff0c 错误主要是 xff1a selinux is active unexpected inconsistency RUN fsck MANUALLY 原因是因为意外关机如断电 xff0c 或者虚拟机中强
  • Linux永久修改主机名

    hostnamectl set hostname xxx
  • 去除重复字母(Java实现)

    题目 去除重复字母 给你一个字符串 s xff0c 请你去除字符串中重复的字母 xff0c 使得每个字母只出现一次 需保证 返回结果的字典序最小 xff08 要求不能打乱其他字符的相对位置 xff09 示例1 输入 xff1a s 61 b
  • JDK介绍(笔记学习)

    JDK介绍 1 JRE和JDK xff08 记忆 xff09 JDK 称为Java开发工具 xff0c 包含了JRE和开发工具 JRE Java运行环境 xff0c 包含了JVM和Java的核心类库 xff08 Java API xff09
  • Collections类(笔记)

    1 Collections的常用功能 重点 import java util Collections java util Collections是集合工具类 xff0c 用来对集合进行操作 常用方法如下 xff1a public stati
  • 计算机网络原理学习笔记第一篇

    计算机网络的出现 世界上第一台电子计算机问世于1946年 xff0c 由于当时造价昂贵 体积极大等原因 xff0c 因此计算机的数量极少 计算机系统是高度集中的 xff0c 它的所有设备都安装在单独的机房中 xff0c 为了提高计算机的利用
  • mac下Tomcat启动成功后浏览器输入localhost:8080拒绝连接的解决办法

    今天根据大佬们的安装教程将Tomcat安装并成功启动 xff0c 而在浏览器中输入localhost xff1a 8080后却出现了 localhost拒绝了我们的连接请求 的字样 xff0c 网上的解决方案五花八门 xff0c 水平也是参
  • Linux中的软件管理

    Linux中的软件管理 yum源头 定义 xff1a yum源是一个软件集合地 xff0c 只需要搜索并安装你想要的软件 yum的全称是Yellowdog Updater Modified xff0c 是一个shell前端软件包管理器 xf

随机推荐

  • Spring拦截器HandlerInterceptor和HandlerInterceptorAdapter

    参考 https blog csdn net zhibo lv article details 81699360 https www cnblogs com jing99 p 11147152 html HandlerInterceptor
  • Java多线程超详解

    引言 随着计算机的配置越来越高 xff0c 我们需要将进程进一步优化 xff0c 细分为线程 xff0c 充分提高图形化界面的多线程的开发 这就要求对线程的掌握很彻底 那么话不多说 xff0c 今天本帅将记录自己线程的学习 程序 xff0c
  • 如何在Ubuntu 20.04上使用UFW设置防火墙

    介绍 Introduction UFW or Uncomplicated Firewall is a simplified firewall management interface that hides the complexity of
  • 人工智能主要分支

    人工智能主要分支 1 主要分支介绍 通讯 感知与行动是现代人工智能的三个关键能力 xff0c 在这里我们将根据这些能力 应用对这三个技术领域进行介绍 xff1a 计算机视觉 CV 人脸识别 自然语言处理 NLP 语音识别 语义识别 在 NL
  • 解决文件上传过大报错The field file exceeds its maximum permitted size of 1048576 bytes.问题

    报错内容如下 只需要在相应的yml配置文件spring下增加相关配置即可
  • 我有一个IT梦

    介绍 作为一名大二的学生 xff0c 接触计算机基础技术近乎俩年 xff0c 俩年来我愈加发觉计算机是一门发展力很强的学科 它多式多样 xff0c 更像是一种挑战 xff0c 对于好强的我来说 xff0c 越来越着迷计算机的世界 纵然未知的
  • Nginx安装教程

    前言 xff1a 同步文章图片有问题想看带有图片版的请移步 xff1a https www yuque com docs share 3fbd7d5a 639c 4ca8 8500 00071b7cb23d BvpWF 本篇文章涉及ngin
  • Kali-Linux-2020.1 设置中文,汉化。

    Kali Linux 2020 1 设置中文 xff0c 汉化 Kali Linux团队在Twitter上宣布 xff1a 新的一年是进行重大改变的好时机 xff0c 因此 xff0c 我们宣布在 即将发布的2020 1版本中 xff0c
  • PowerShell压缩和解压ZIP文件

    压缩 Compress Archive Path D File DestinationPath E File zip 解压 Expand Archive Path E File zip DestinationPath D File
  • python实现基本算法之归并排序(Merge sort)

    基本算法之归并排序 Merge sort 基本算法 04 归并排序 Merge sort 算法 往期请看选择排序 xff0c 插入排序 xff0c 归并排序 xff0c 快速排序等等都发布的 xff01 欢迎大家批评指正 xff01 文章目
  • mysql 异步复制VS半同步复制

    MySQL数据复制原理 异步复制 xff1a 默认情况下 xff0c MySQL的复制是异步复制 xff0c 主服务器及其从服务器是独立的 异步复制可以提供最佳的性能 xff0c 主服务器将更新的数据写入二进制日志 xff08 Binlog
  • mysql读写分离

    读写分离 master xff1a 192 span class token punctuation span 168 span class token punctuation span 2 span class token punctua
  • 在linux中关闭防火墙

    在linux中关闭防火墙 selinux xff08 secure linux 安全的linux xff09 selinux 是linux下的安全措施机制 xff0c 用来保护linux系统的安全 相当于另外一个安全工具 span clas
  • Google Payments?

    The news broke late last week by way of the Wall Street Journal with rumors of a payments service akin to PayPal forthco
  • 数据库中某个表中的某个字段的值是用逗号隔开的多个值,根据逗号拆分并从另一个表中查出数据返回

    两个表的结构如下 a表 b 表 关系说明 b teacherid 61 a user id 查询思路 xff1a FIND IN SET str strlist xff0c 该函数用于判断 str 是否在 strlist 中 xff0c 如
  • 一个玩游戏的失足青年,转行做游戏开发到教育的挣扎过程

    14年的IT从业经历 xff0c 中专毕业后在小镇上开过网吧 在网吧一年多的时间里 xff0c 天天陪人玩游戏 xff0c 后来去读了一个三流计算机专业 xff0c 毕业后转做软件开发 xff0c 最近五年转入游戏开发行业 xff01 从网
  • minikube的部署和安装,排错

    minikube的部署和安装 安装minikube的步骤 环境准备 xff1a 虚拟机至少2个cpu核心 xff0c 2G内存 xff0c 磁盘20G 推荐使用2个cpu核心 xff0c 4G的内存 xff0c 100G的磁盘空间 前期 x
  • lvm逻辑卷

    lvm示例应用 案例描述 xff1a 增加四块scsi硬盘 xff0c 每块100G xff0c 并构建lvm逻辑卷 xff0c 挂载到相应目录下 传统的分区方式 常用命令 临时添加IP地址 xff1a ip add add 192 168
  • VMware虚拟机开机显示you are in emergency mode 解决办法

    问题描述 xff1a 虚拟机开机出错 xff1a you are in emergency mode 出错原因 xff1a 前不久学习lvm逻辑卷时 xff0c 添加磁盘后 xff0c 修改了 etc fstab文件实现开机自动挂载 因为弄
  • k8s学习笔记-暴露服务--暴露服务踩坑排错

    deployment 部署和调度的工具 xff08 组件 xff09 span class token namespace root 64 k8s2 docker span span class token comment kubectl