首页 > 其他分享 >解决etcd服务--listen-metrics-urls=http://127.0.0.1:2381

解决etcd服务--listen-metrics-urls=http://127.0.0.1:2381

时间:2023-11-10 16:46:47浏览次数:50  
标签:node 127.0 urls kubernetes -- system 2381 etcd kube

 1、查看etcd的2381端口

[root@master-node manifests]# netstat -anp|grep 2381
tcp        0      0 127.0.0.1:2381      0.0.0.0:*               LISTEN      21765/etcd 

2、获取etcd的pod

[root@master-node manifests]# kubectl get pod -A
NAMESPACE       NAME                                    READY   STATUS    RESTARTS   AGE
cattle-system   cattle-cluster-agent-7f9549666f-vmxg4   0/1     Error     316        28h
kube-system     coredns-6d56c8448f-q4z57                1/1     Running   19         2d4h
kube-system     coredns-6d56c8448f-zfkq6                1/1     Running   20         2d4h
kube-system     etcd-master-node                        1/1     Running   0          13m
kube-system     kube-apiserver-master-node              1/1     Running   19         2d4h
kube-system     kube-controller-manager-master-node     1/1     Running   140        2d4h
kube-system     kube-flannel-ds-676v4                   1/1     Running   1          2d4h
kube-system     kube-flannel-ds-7jgt4                   0/1     Error     345        47h
kube-system     kube-proxy-bplzt                        1/1     Running   3          2d4h
kube-system     kube-proxy-dlg4d                        1/1     Running   1          47h
kube-system     kube-scheduler-master-node       

3、查看etcd的​​pod​​详细信息

[root@master-node manifests]# kubectl describe pod etcd-master-node -n kube-system
Name:                 etcd-master-node
Namespace:            kube-system
Priority:             2000001000
Priority Class Name:  system-node-critical
Node:                 master-node/192.168.0.122
Start Time:           Wed, 08 Nov 2023 12:21:48 +0800
Labels:               component=etcd
                      tier=control-plane
Annotations:          kubeadm.kubernetes.io/etcd.advertise-client-urls: https://192.168.0.122:2379
                      kubernetes.io/config.hash: 38ea1142faa6b3f8c460f84403b98231
                      kubernetes.io/config.mirror: 38ea1142faa6b3f8c460f84403b98231
                      kubernetes.io/config.seen: 2023-11-10T16:19:05.396386513+08:00
                      kubernetes.io/config.source: file
Status:               Running
IP:                   192.168.0.122
IPs:
  IP:           192.168.0.122
Controlled By:  Node/master-node
Containers:
  etcd:
    Container ID:  docker://4e1937cde08ee05e572d9e3b4e39e1fa44c5f9113dec93f21c4f616ae244dd60
    Image:         registry.aliyuncs.com/google_containers/etcd:3.4.13-0
    Image ID:      docker-pullable://registry.aliyuncs.com/google_containers/etcd@sha256:4ad90a11b55313b182afc186b9876c8e891531b8db4c9bf1541953021618d0e2
    Port:          <none>
    Host Port:     <none>
    Command:
      etcd
      --advertise-client-urls=https://192.168.0.122:2379
      --cert-file=/etc/kubernetes/pki/etcd/server.crt
      --client-cert-auth=true
      --data-dir=/var/lib/etcd
      --initial-advertise-peer-urls=https://192.168.0.122:2380
      --initial-cluster=master-node=https://192.168.0.122:2380
      --key-file=/etc/kubernetes/pki/etcd/server.key
      --listen-client-urls=https://127.0.0.1:2379,https://192.168.0.122:2379
      --listen-metrics-urls=http://127.0.0.1:2381
      --listen-peer-urls=https://192.168.0.122:2380
      --name=master-node
      --peer-cert-file=/etc/kubernetes/pki/etcd/peer.crt
      --peer-client-cert-auth=true
      --peer-key-file=/etc/kubernetes/pki/etcd/peer.key
      --peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
      --snapshot-count=10000
      --trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
    State:          Running
      Started:      Fri, 10 Nov 2023 16:19:35 +0800
    Ready:          True
    Restart Count:  0
    Liveness:       http-get http://127.0.0.1:2381/health delay=10s timeout=15s period=10s #success=1 #failure=8
    Startup:        http-get http://127.0.0.1:2381/health delay=10s timeout=15s period=10s #success=1 #failure=24
    Environment:    <none>
    Mounts:
      /etc/kubernetes/pki/etcd from etcd-certs (rw)
      /var/lib/etcd from etcd-data (rw)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  etcd-certs:
    Type:          HostPath (bare host directory volume)
    Path:          /etc/kubernetes/pki/etcd
    HostPathType:  DirectoryOrCreate
  etcd-data:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/etcd
    HostPathType:  DirectoryOrCreate
QoS Class:         BestEffort
Node-Selectors:    <none>
Tolerations:       :NoExecuteop=Exists
Events:
  Type    Reason   Age    From     Message
  ----    ------   ----   ----     -------
  Normal  Pulled   9m47s  kubelet  Container image "registry.aliyuncs.com/google_containers/etcd:3.4.13-0" already present on machine
  Normal  Created  9m47s  kubelet  Created container etcd
  Normal  Started  9m46s  kubelet  Started container etcd

 4、编辑etcd.yaml

vi /etc/kubernetes/manifests/etcd.yaml 

 5、验证

 

标签:node,127.0,urls,kubernetes,--,system,2381,etcd,kube
From: https://www.cnblogs.com/uestc2007/p/17824429.html

相关文章

  • 某地区DNS查询解析域名信息后出现本机地址127.0.0.1和0.0.0.0
    一、现象背景: 接某地区分公司同事反馈,手机移动网络无法通过公网访问公司业务系统二、分析过程:1、查看流量入口Nginx,公网访问记录都正常,无异常日志。2、联系用户查询手机客户端出口IP,通过浏览器地址栏中输入,在外部防火墙侧和Nginx侧都未发现有该用户来源IP访问记录,黑名单也无。......
  • Disconnected from the target VM, address: '127.0.0.1:56577', transport: 'socket'
    DisconnectedfromthetargetVM,address:'127.0.0.1:56577',transport:'socket'端口占用DisconnectedfromthetargetVM,address:'127.0.0.1:56577',transport:'socket'DisconnectedfromthetargetVM=与目标虚拟机断开连接。PS:......
  • 0.0.0.0与127.0.0.1
    0.0.0.0指的是本机上的所有IPV4地址,该主机上的一个服务监听的地址是0.0.0.0,那么网络上的其他主机通过该服务器的ip才可以访问到该此服务。如果一个服务监听的地址是127.0.0.1,那么其他网络上的其他主机通过该服务器的ip才可以访问到该此服务,因为127.0.0.1代表回环,只用于本机访问本......
  • uniapp项目实践总结(二十)URLScheme 协议知识总结
    导语:在日常开发过程中,我们经常可以碰到很多的调起某个应用,打开唤醒某个APP,链式启动App等场景,背后就涉及到了URLScheme协议的相关知识,下面就简单介绍一下。目录简介常见URLScheme跳转方法实战演练案例展示简介URLScheme是一个可以让APP之间互相跳转的协议,每......
  • yourls安装-报错AbstractExtendedPdo.php
    1`Fatalerror:UncaughtPDOException:SQLSTATE[HY000]:Generalerror:3Errorwritingfile'./example_com/yourls_url.frm'(Errcode:28)in/www/wwwroot/example.com/includes/vendor/aura/sql/src/AbstractExtendedPdo.php:565Stacktrace:#0/www/w......
  • CentOS8 ifconfig时显示127.0.0.1问题
    CentOS8ifconfig时ip地址为127.0.0.1参考:https://blog.csdn.net/weixin_43888891/article/details/131893425?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~Position-3-131893425-blog-131429967.235^v38^pc_relev......
  • fiddler 无法抓取127.0.0.1解决
    参考官网地址:https://docs.telerik.com/fiddler/observe-traffic/troubleshooting/notraffictolocalhost ......
  • linux(ubuntu)能ping ip,不能ping域名。无法解析域名DNS指向127.0.0.53问题处理
    故障现象:无法上网。ping互联网ip地址能通信,ping域名无法解析。用nslookupwww.qq.com返回127.0.0.53无法解析的问题。重启无法解决。编辑/etc/resolved.conf配置文件dns写的127.0.0.53.直接添加新的dns,果reboot重启之后,还是原来的内容不变首先修改/etc/systemd/resolved.conf文件......
  • vs的web调试以127.0.0.1启动
     VS以127.0.0.1调试步骤_SuperMan25的博客-CSDN博客默认以localhost启动,无法接收127.0.0.1 1.管理员启动vs2.邮件单击项目-》属性更改项目启动路径为127.0.0.13.打开项目所在文件找到这个config4.更改其对应端口启动地址为127.0.0.1 ......
  • Gitc错误Failed to connect to 127.0.0.1 port 1080 Connection refused拒绝连接错误
    一、git拒绝连接原因分析使用git从远程仓库下载代码出现上述的错误是因为使用了proxy代理,所以要解决该问题,核心操作就是要取消代理二、解决方式1、查看Linux当前有没有使用代理通过git的配置文件查看有无使用代理(没有成功)查询是否使用代理:gitconfig--globalhttp.proxyg......