[K8S:命令执行:权限异常:解决篇]:通过更新kubeconfig配置相关信息

文章目录

  • 一:场景复现:
    • 1.1:关键信息:
    • 1.2:全异常日志输出:
  • 二:解决流程:
    • 2.1:更新 kubeconfig:
      • 2.1.1:执行命令:
    • 2.2:再次执行之前的异常命令:
    • 2.3:k8s配置操作config相关命令:
    • 2.4:重新执行之前操作失效命令:
    • 2.5:[解决]:重新启动机器后发现kubectl apply -f相关命令又失效无权限相关:
      • 2.5.1:异常日志显示:
      • 2.5.2:解决方式:执行export KUBECONFIG=/root/.kube/config / chmod g-r /root/.kube/config

一:场景复现:

1.1:关键信息:

执行K8S相关命令显示关键信息

Name: "calico-config", Namespace: "kube-system"
from server for: "calico.yaml": configmaps "calico-config" is forbidden: User "system:node:vboxnode3ccccccttttttchenyang" cannot ge API group "" in the namespace "kube-system": no relationship found between node 'vboxnode3ccccccttttttchenyang' and this object
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "bgpconfigurations.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "bgpconfigurations.crd.projectcalico.org" is forbiddnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "bgppeers.crd.projectcalico.org", Namespace: ""

1.2:全异常日志输出:

[root@vboxnode3ccccccttttttchenyang ~]# kubectl apply -f calico.yaml
^[[Aerror parsing calico.yaml: error converting YAML to JSON: yaml: line 153: found character that cannot start any token
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=configmaps", GroupVersionKind: "/v1, Kind=ConfigMap"
Name: "calico-config", Namespace: "kube-system"
from server for: "calico.yaml": configmaps "calico-config" is forbidden: User "system:node:vboxnode3ccccccttttttchenyang" cannot ge API group "" in the namespace "kube-system": no relationship found between node 'vboxnode3ccccccttttttchenyang' and this object
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "bgpconfigurations.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "bgpconfigurations.crd.projectcalico.org" is forbiddnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "bgppeers.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "bgppeers.crd.projectcalico.org" is forbidden: User ccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "blockaffinities.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "blockaffinities.crd.projectcalico.org" is forbiddende3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "caliconodestatuses.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "caliconodestatuses.crd.projectcalico.org" is forbidxnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scop
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "clusterinformations.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "clusterinformations.crd.projectcalico.org" is forbioxnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster sco
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "felixconfigurations.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "felixconfigurations.crd.projectcalico.org" is forbioxnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster sco
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "globalnetworkpolicies.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "globalnetworkpolicies.crd.projectcalico.org" is forvboxnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster s
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "globalnetworksets.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "globalnetworksets.crd.projectcalico.org" is forbiddnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "hostendpoints.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "hostendpoints.crd.projectcalico.org" is forbidden: 3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "ipamblocks.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "ipamblocks.crd.projectcalico.org" is forbidden: Useccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "ipamconfigs.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "ipamconfigs.crd.projectcalico.org" is forbidden: Uscccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "ipamhandles.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "ipamhandles.crd.projectcalico.org" is forbidden: Uscccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "ippools.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "ippools.crd.projectcalico.org" is forbidden: User "cttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "ipreservations.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "ipreservations.crd.projectcalico.org" is forbidden:e3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "kubecontrollersconfigurations.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "kubecontrollersconfigurations.crd.projectcalico.orgem:node:vboxnode3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the c
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "networkpolicies.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "networkpolicies.crd.projectcalico.org" is forbiddende3ccccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomRes
Name: "networksets.crd.projectcalico.org", Namespace: ""
from server for: "calico.yaml": customresourcedefinitions.apiextensions.k8s.io "networksets.crd.projectcalico.org" is forbidden: Uscccccttttttchenyang" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=clusterroles", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=ClusterRole"
Name: "calico-kube-controllers", Namespace: ""
from server for: "calico.yaml": clusterroles.rbac.authorization.k8s.io "calico-kube-controllers" is forbidden: User "system:node:vbg" cannot get resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=clusterrolebindings", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=Clust
Name: "calico-kube-controllers", Namespace: ""
from server for: "calico.yaml": clusterrolebindings.rbac.authorization.k8s.io "calico-kube-controllers" is forbidden: User "system:chenyang" cannot get resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=clusterroles", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=ClusterRole"
Name: "calico-node", Namespace: ""
from server for: "calico.yaml": clusterroles.rbac.authorization.k8s.io "calico-node" is forbidden: User "system:node:vboxnode3ccccct resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=clusterrolebindings", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=Clust
Name: "calico-node", Namespace: ""
from server for: "calico.yaml": clusterrolebindings.rbac.authorization.k8s.io "calico-node" is forbidden: User "system:node:vboxnodnnot get resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope

二:解决流程:

2.1:更新 kubeconfig:

2.1.1:执行命令:

export KUBECONFIG=/root/.kube/config
chmod g-r /root/.kube/config

2.2:再次执行之前的异常命令:

[root@vboxnode3ccccccttttttchenyang ~]#  kubectl get deployment
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
[root@vboxnode3ccccccttttttchenyang ~]# kubectl apply -f calico.yaml
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

在这里插入图片描述

2.3:k8s配置操作config相关命令:

这一步应该在安装K8S kubeadm init后面执行,之前安装忘记这一步。

 mkdir -p $HOME/.kube
 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
 sudo chown $(id -u):$(id -g) $HOME/.kube/config

[root@vboxnode3ccccccttttttchenyang ~]# mkdir -p $HOME/.kube
[root@vboxnode3ccccccttttttchenyang ~]#
[root@vboxnode3ccccccttttttchenyang ~]# sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
cp:是否覆盖"/root/.kube/config"? y
[root@vboxnode3ccccccttttttchenyang ~]# sudo chown ( i d − u ) : (id -u): (idu):(id -g) $HOME/.kube/config
在这里插入图片描述
在这里插入图片描述

2.4:重新执行之前操作失效命令:

可以看见都已经生效:

kubectl get nodes -o wide
kubectl apply -f calico.yaml
[root@vboxnode3ccccccttttttchenyang ~]# kubectl get nodes -o wide
NAME                            STATUS     ROLES                  AGE   VERSION   INTERNAL-IP      EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                CONTAINER-RUNTIME
chenyang-mine-vbox02            NotReady   <none>                 19h   v1.21.0   192.168.56.102   <none>        CentOS Linux 7 (Core)   3.10.0-1160.88.1.el7.x86_64   docker://23.0.5
vboxnode3ccccccttttttchenyang   NotReady   control-plane,master   19h   v1.21.0   192.168.56.103   <none>        CentOS Linux 7 (Core)   3.10.0-1160.90.1.el7.x86_64   docker://23.0.5
[root@vboxnode3ccccccttttttchenyang ~]# kubectl apply -f calico.yaml
configmap/calico-config created
customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/caliconodestatuses.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/ipreservations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org created
customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org created
clusterrole.rbac.authorization.k8s.io/calico-kube-controllers created
clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers created
clusterrole.rbac.authorization.k8s.io/calico-node created
clusterrolebinding.rbac.authorization.k8s.io/calico-node created
error: error parsing calico.yaml: error converting YAML to JSON: yaml: line 153: found character that cannot start any token
[root@vboxnode3ccccccttttttchenyang ~]#

在这里插入图片描述

2.5:[解决]:重新启动机器后发现kubectl apply -f相关命令又失效无权限相关:

2.5.1:异常日志显示:

[root@vboxnode3ccccccttttttchenyang ~]# vim calico.yaml
-bash: vim: 未找到命令
[root@vboxnode3ccccccttttttchenyang ~]# vi calico.yaml
[root@vboxnode3ccccccttttttchenyang ~]# kubectl apply -f calico.yaml
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "policy/v1, Resource=poddisruptionbudgets", GroupVersionKind: "policy/v1, Kind=PodDisruptionBudget"
Name: "calico-kube-controllers", Namespace: "kube-system"
from server for: "calico.yaml": poddisruptionbudgets.policy "calico-kube-controllers" is forbidden: User "system:node:vboxnode3cccc                                                                 ccttttttchenyang" cannot get resource "poddisruptionbudgets" in API group "policy" in the namespace "kube-system"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=serviceaccounts", GroupVersionKind: "/v1, Kind=ServiceAccount"
Name: "calico-kube-controllers", Namespace: "kube-system"
from server for: "calico.yaml": serviceaccounts "calico-kube-controllers" is forbidden: User "system:node:vboxnode3ccccccttttttchen                                                                 yang" cannot get resource "serviceaccounts" in API group "" in the namespace "kube-system": can only create tokens for individual s                                                                 ervice accounts
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=serviceaccounts", GroupVersionKind: "/v1, Kind=ServiceAccount"
Name: "calico-node", Namespace: "kube-system"
from server for: "calico.yaml": serviceaccounts "calico-node" is forbidden: User "system:node:vboxnode3ccccccttttttchenyang" cannot                                                                  get resource "serviceaccounts" in API group "" in the namespace "kube-system": can only create tokens for individual service accou                                                                 nts

在这里插入图片描述

2.5.2:解决方式:执行export KUBECONFIG=/root/.kube/config / chmod g-r /root/.kube/config

export KUBECONFIG=/root/.kube/config
chmod g-r /root/.kube/config
kubectl apply -f calico.yaml

[root@vboxnode3ccccccttttttchenyang ~]# export KUBECONFIG=/root/.kube/config
[root@vboxnode3ccccccttttttchenyang ~]# chmod g-r /root/.kube/config
[root@vboxnode3ccccccttttttchenyang ~]# kubectl apply -f calico.yaml

kubectl delete pod coredns-545d6fc579-6ddhj coredns-545d6fc579-nkk68 -n kube-system

[root@vboxnode3ccccccttttttchenyang ~]# export KUBECONFIG=/root/.kube/config
[root@vboxnode3ccccccttttttchenyang ~]# chmod g-r /root/.kube/config
[root@vboxnode3ccccccttttttchenyang ~]# kubectl apply -f calico.yaml
poddisruptionbudget.policy/calico-kube-controllers created
serviceaccount/calico-kube-controllers created
serviceaccount/calico-node created
configmap/calico-config unchanged
customresourcedefinition.apiextensions.k8s.io/bgpconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/caliconodestatuses.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/clusterinformations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/globalnetworksets.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/hostendpoints.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ippools.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/ipreservations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/kubecontrollersconfigurations.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networkpolicies.crd.projectcalico.org configured
customresourcedefinition.apiextensions.k8s.io/networksets.crd.projectcalico.org configured
clusterrole.rbac.authorization.k8s.io/calico-kube-controllers configured
clusterrole.rbac.authorization.k8s.io/calico-node configured
clusterrolebinding.rbac.authorization.k8s.io/calico-kube-controllers unchanged
clusterrolebinding.rbac.authorization.k8s.io/calico-node unchanged
daemonset.apps/calico-node created
deployment.apps/calico-kube-controllers created
[root@vboxnode3ccccccttttttchenyang ~]#

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/62383.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【react】react中BrowserRouter和HashRouter的区别:

文章目录 1.底层原理不一样:2.path衣现形式不一样3.刷新后对路山state参数的影响4.备注: HashRouter可以用于解决一些路径错误相关的问题 1.底层原理不一样: BrowserRouter使用的是H5的history API&#xff0c;不兼容IE9及以下版不。 HashRouter使用的是URL的哈希值。 2.path衣…

DHCP协议及其实验(eNSP)

目录 一&#xff0c;DHCP 1.1&#xff0c;DHCP作用 1.2&#xff0c;DHCP地址池 1.3&#xff0c;DHCP报文类型 1.4&#xff0c;DHCP工作原理 对DHCP工作原理的思考&#xff1a; 1.5&#xff0c;DHCP租期更新 1.6&#xff0c;DHCP重绑定 1.7&#xff0c;IP地址释放 二&am…

笔记本WIFI连接无网络【实测有效解决方案,不用重启电脑】

笔记本Wifi连接无网络实测有效解决方案 问题描述&#xff1a; 笔记本买来一段时间后&#xff0c;WIFI网络连接开机一段时间还正常连接&#xff0c;但是过一段时间显示网络连接不上解决方案&#xff1a; 1.编写网络重启bat脚本&#xff0c;将以下内容写到文本文件&#xff0c;把…

华夏ERP信息泄露

声明 本文仅用于技术交流&#xff0c;请勿用于非法用途 由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失&#xff0c;均由使用者本人负责&#xff0c;文章作者不为此承担任何责任。 文章作者拥有对此文章的修改和解释权。如欲转载或传播此文章&#xff0c…

用 Gaussian Process 建模 state-action 空间相关性,加速 Multi-Fidelity RL

1 intro 利用相邻 state-action 的空间相关性来加速学习&#xff1a;通过 Gaussian Process&#xff08;GP&#xff09;作为函数逼近器。主要贡献&#xff1a;两个算法。 model-based MFRL 算法 GP-VI-MFRL&#xff0c;估计转换函数&#xff0c;然后使用 value iteration 计算…

EVE-NG MPLS L2VPN LDP lsp

目录 1 拓扑 2 配置步骤 2.1 配置接口IP 和路由协议 2.2 配置MPLS LDP 2.3 配置L2VPN PW(LDP) 2.4 验证L2VPN 1 拓扑 2 配置步骤 2.1 配置接口IP 和路由协议 PE1 interface LoopBack 0ip address 1.1.1.9 32 quitinterface GigabitEthernet1/0ip address 10.1.1.1 25…

【ONE·Linux || 基础IO(二)】

总言 文件系统与动静态库相关介绍。 文章目录 总言2、文件系统2.1、背景知识2.2、磁盘管理2.2.1、磁盘文件系统图2.2.2、inode与文件名 2.3、软硬链接 3、动静态库3.1、站在编写库的人的角度&#xff1a;如何写一个库&#xff1f;3.1.1、静态库制作3.1.3、动态库制作 3.2、站在…

机器学习深度学习——序列模型(NLP启动!)

&#x1f468;‍&#x1f393;作者简介&#xff1a;一位即将上大四&#xff0c;正专攻机器学习的保研er &#x1f30c;上期文章&#xff1a;机器学习&&深度学习——卷积神经网络&#xff08;LeNet&#xff09; &#x1f4da;订阅专栏&#xff1a;机器学习&&深度…

VS2022程序集说明汉化

下载本地化的 .NET IntelliSense 文件 https://dotnet.microsoft.com/zh-cn/download/intellisense 目前本地化的 IntelliSense 文件不再可用。 可用的最新版本是 .NET 5。 建议使用英语 IntelliSense 文件。 .NET6的汉化需要自己动手&#xff1a; 教程可以参照下方&#xff1a…

Spring Cloud Alibaba (一)

1 微服务介绍 1.1 系统架构演变 随着互联网的发展&#xff0c;网站应用的规模也在不断的扩大&#xff0c;进而导致系统架构也在不断的进行变化。 从互联网早起到现在&#xff0c;系统架构大体经历了下面几个过程: 单体应用架构--->垂直应用架构--->分布 式架构--->S…

【数据结构OJ题】合并两个有序数组

原题链接&#xff1a;https://leetcode.cn/problems/merge-sorted-array/ 目录 1. 题目描述 2. 思路分析 3. 代码实现 1. 题目描述 2. 思路分析 看到这道题&#xff0c;我们注意到nums1[ ]和nums2[ ]两个数组都是非递减的。所以我们很容易想到额外开一个数组tmp[ ]&#x…

vue整合脑图编辑管理系统-kitymind百度脑图

前言 项目为前端vue项目&#xff0c;把kitymind百度脑图整合到前端vue项目中&#xff0c;显示了脑图的绘制&#xff0c;编辑&#xff0c;到处为json&#xff0c;png&#xff0c;text等格式的功能 文章末尾有相关的代码链接&#xff0c;代码只包含前端项目&#xff0c;在原始的…

MySQL-NoSQL整体笔记---持续输出中

MySQL部分 一、搭建 MySQL 数据库服务器 1、下载并上传glibc版本的Mysql 2、新建用户以安全方式运行进程 [roottemplate ~]# groupadd -r -g 306 mysql [roottemplate ~]# useradd -g 306 -r -u 306 mysql3、安装并初始化mysql [roottemplate ~]# tar xf mysql-5.7.36-linu…

STM32 DMA学习

DMA简称 DMA&#xff0c;Direct Memory Access&#xff0c;即直接存储器访问。DMA传输方式无需CPU直接控制传输&#xff0c;也没有中断处理方式那样保留现场和恢复现场的过程&#xff0c;通过硬件为RAM与I/O设备开辟一条直接传送数据的通路&#xff0c;能使CPU的效率大为提高。…

K8s中的Ingress

1.把端口号对外暴露&#xff0c;通过ip端口号进行访问 使用Service里面的NodePort实现 2.NodePort缺陷 在每个节点上都会起到端口&#xff0c;在访问时候通过任何节点&#xff0c;通过节点ip暴露端口号实现访问 意味着每个端口只能使用一次&#xff0c;一个端口对应一个应用…

STM32刷Micropython固件参考指南

STM32刷Micropython固件指南 其实刷固件和普通的程序下载烧录无多大的差异&#xff0c;主要是其他因数的影响导致刷固件或刷完固件无法运行的情况和相关问题。 &#x1f4d1;刷固件教程 固件下载。目前所支持的stm32型号有这些&#xff1a; stm32f0, stm32f4, stm32f7, stm32g…

[Docker实现测试部署CI/CD----Jenkins集成相关服务器(3)]

目录 7、 Jenkins 集成 SonarQubeJenkins 中安装 SonarScanner下载移动修改配置文件 8、Jenkins配置SonarQube安装插件添加SonarQube添加 SonarScanner 9、Jenkins集成目标服务器 7、 Jenkins 集成 SonarQube Jenkins 中安装 SonarScanner SonarScanner 是一种代码扫描工具&am…

基于springboot+vue的房屋租赁系统(前后端分离)

博主主页&#xff1a;猫头鹰源码 博主简介&#xff1a;Java领域优质创作者、CSDN博客专家、公司架构师、全网粉丝5万、专注Java技术领域和毕业设计项目实战 主要内容&#xff1a;毕业设计(Javaweb项目|小程序等)、简历模板、学习资料、面试题库、技术咨询 文末联系获取 项目介绍…

MapReduce基础原理、MR与MPP区别

MapReduce概述 MapReduce&#xff08;MR&#xff09;本质上是一种用于数据处理的编程模型&#xff1b;MapReduce用于海量数据的计算&#xff0c;HDFS用于海量数据的存储&#xff08;Hadoop Distributed File System&#xff0c;Hadoop分布式文件系统&#xff09;。Hadoop MapR…

学编程实用网站

牛客网&#xff1a;面试刷题和面试经验分享的网站牛客网 - 找工作神器|笔试题库|面试经验|实习招聘内推&#xff0c;求职就业一站解决_牛客网 (nowcoder.com)https://www.nowcoder.com/ 慕课网&#xff1a;在线学习 慕课网-程序员的梦工厂 (imooc.com)https://www.imooc.com/ …