$ linkerd version
Client version: stable-2.11.1Server version: unavailable
正常可以看到 CLI 的版本信息,但是会出现 Server version: unavailable 信息,这是因为还没有在 Kubernetes 集群上安装控制平面造成的,因此接下来就来安装 Server 端。Kubernetes 集群可以通过多种不同的方式进行配置,在安装 Linkerd 控制平面之前,需要检查并验证所有配置是否正确,要检查集群是否已准备好安装 Linkerd,可以执行下面的命令:
$ linkerd check --pre
Linkerd core checks
===================kubernetes-api
--------------
√ can initialize the client
√ can query the KubernetesAPIkubernetes-version
------------------
√ is running the minimum KubernetesAPI version
√ is running the minimum kubectl versionpre-kubernetes-setup
--------------------
√ control plane namespace does not already exist
√ can create non-namespaced resources
√ can create ServiceAccounts
√ can create Services
√ can create Deployments
√ can create CronJobs
√ can create ConfigMaps
√ can create Secrets
√ can read Secrets
√ can read extension-apiserver-authentication configmap
√ no clock skew detectedlinkerd-version
---------------
√ can determine the latest version
‼ cli is up-to-dateis running version 2.11.1 but the latest stable version is 2.11.4see https://linkerd.io/2.11/checks/#l5d-version-cli for hintsStatus check results are √
$ linkerd checkLinkerd core checks
===================kubernetes-api
--------------
√ can initialize the client
√ can query the KubernetesAPIkubernetes-version
------------------
√ is running the minimum KubernetesAPI version
√ is running the minimum kubectl versionlinkerd-existence
-----------------
√ 'linkerd-config' config map exists
√ heartbeat ServiceAccount exist
√ control plane replica sets are ready
√ no unschedulable pods
√ control plane pods are ready
√ cluster networks contains all node podCIDRslinkerd-config
--------------
√ control plane Namespace exists
√ control plane ClusterRoles exist
√ control plane ClusterRoleBindings exist
√ control plane ServiceAccounts exist
√ control plane CustomResourceDefinitions exist
√ control plane MutatingWebhookConfigurations exist
√ control plane ValidatingWebhookConfigurations existlinkerd-identity
----------------
√ certificate config is valid
√ trust anchors are using supported crypto algorithm
√ trust anchors are within their validity period
√ trust anchors are valid for at least 60 days
√ issuer cert is using supported crypto algorithm
√ issuer cert is within its validity period
√ issuer cert is valid for at least 60 days
√ issuer cert is issued by the trust anchorlinkerd-webhooks-and-apisvc-tls
-------------------------------
√ proxy-injector webhook has valid cert
√ proxy-injector cert is valid for at least 60 days
√ sp-validator webhook has valid cert
√ sp-validator cert is valid for at least 60 days
√ policy-validator webhook has valid cert
√ policy-validator cert is valid for at least 60 dayslinkerd-version
---------------
√ can determine the latest version
‼ cli is up-to-dateis running version 2.11.1 but the latest stable version is 2.11.4see https://linkerd.io/2.11/checks/#l5d-version-cli for hintscontrol-plane-version
---------------------
√ can retrieve the control plane version
‼ control plane is up-to-dateis running version 2.11.1 but the latest stable version is 2.11.4see https://linkerd.io/2.11/checks/#l5d-version-control for hints
√ control plane and cli versions matchlinkerd-control-plane-proxy
---------------------------
√ control plane proxies are healthy
‼ control plane proxies are up-to-datesome proxies are not running the current version:* linkerd-destination-79d6fc496f-dcgfx(stable-2.11.1)* linkerd-identity-6b78ff444f-jwp47(stable-2.11.1)* linkerd-proxy-injector-86f7f649dc-v576m(stable-2.11.1)see https://linkerd.io/2.11/checks/#l5d-cp-proxy-version for hints
√ control plane proxies and cli versions matchStatus check results are √
当出现上面的 Status check results are √ 信息后表示 Linkerd 的控制平面安装成功。除了使用 CLI 工具的方式安装控制平面之外,也可以通过 Helm Chart 的方式来安装,如下所示:
$ helm repo add linkerd https://helm.linkerd.io/stable
# set expiry date one year from now,inMac:
$ exp=$(date -v+8760H +"%Y-%m-%dT%H:%M:%SZ")
# inLinux:
$ exp=$(date -d '+8760 hour' +"%Y-%m-%dT%H:%M:%SZ")$ helm install linkerd2 \--set-file identityTrustAnchorsPEM=ca.crt \--set-file identity.issuer.tls.crtPEM=issuer.crt \--set-file identity.issuer.tls.keyPEM=issuer.key \--set identity.issuer.crtExpiry=$exp \linkerd/linkerd2
## see above on how to set $exp
helm install linkerd2 \--set-file identityTrustAnchorsPEM=ca.crt \--set-file identity.issuer.tls.crtPEM=issuer.crt \--set-file identity.issuer.tls.keyPEM=issuer.key \--set identity.issuer.crtExpiry=$exp \-f linkerd2/values-ha.yaml \linkerd/linkerd2
采用哪种方式进行安装均可,到这里就完成了 Linkerd 的安装,重新执行 linkerd version 命令就可以看到 Server 端版本信息:
$ linkerd version
Client version: stable-2.11.1Server version: stable-2.11.1
$ curl -fsL https://run.linkerd.io/emojivoto.yml | kubectl apply -f -
namespace/emojivoto created
serviceaccount/emoji created
serviceaccount/voting created
serviceaccount/web created
service/emoji-svc created
service/voting-svc created
service/web-svc created
deployment.apps/emoji created
deployment.apps/vote-bot created
deployment.apps/voting created
deployment.apps/web created
$ linkerd -n emojivoto check --proxy
Linkerd core checks
===================kubernetes-api
--------------
√ can initialize the client
√ can query the KubernetesAPIkubernetes-version
------------------
√ is running the minimum KubernetesAPI version
√ is running the minimum kubectl versionlinkerd-existence
-----------------
√ 'linkerd-config' config map exists
√ heartbeat ServiceAccount exist
√ control plane replica sets are ready
√ no unschedulable pods
√ control plane pods are ready
√ cluster networks contains all node podCIDRslinkerd-config
--------------
√ control plane Namespace exists
√ control plane ClusterRoles exist
√ control plane ClusterRoleBindings exist
√ control plane ServiceAccounts exist
√ control plane CustomResourceDefinitions exist
√ control plane MutatingWebhookConfigurations exist
√ control plane ValidatingWebhookConfigurations existlinkerd-identity
----------------
√ certificate config is valid
√ trust anchors are using supported crypto algorithm
√ trust anchors are within their validity period
√ trust anchors are valid for at least 60 days
√ issuer cert is using supported crypto algorithm
√ issuer cert is within its validity period
√ issuer cert is valid for at least 60 days
√ issuer cert is issued by the trust anchorlinkerd-webhooks-and-apisvc-tls
-------------------------------
√ proxy-injector webhook has valid cert
√ proxy-injector cert is valid for at least 60 days
√ sp-validator webhook has valid cert
√ sp-validator cert is valid for at least 60 days
√ policy-validator webhook has valid cert
√ policy-validator cert is valid for at least 60 dayslinkerd-identity-data-plane
---------------------------
√ data plane proxies certificate matchCAlinkerd-version
---------------
√ can determine the latest version
‼ cli is up-to-dateis running version 2.11.1 but the latest stable version is 2.11.4see https://linkerd.io/2.11/checks/#l5d-version-cli for hintslinkerd-control-plane-proxy
---------------------------
√ control plane proxies are healthy
‼ control plane proxies are up-to-datesome proxies are not running the current version:* linkerd-destination-79d6fc496f-dcgfx(stable-2.11.1)* linkerd-identity-6b78ff444f-jwp47(stable-2.11.1)* linkerd-proxy-injector-86f7f649dc-v576m(stable-2.11.1)see https://linkerd.io/2.11/checks/#l5d-cp-proxy-version for hints
√ control plane proxies and cli versions matchlinkerd-data-plane
------------------
√ data plane namespace exists
√ data plane proxies are ready
‼ data plane is up-to-datesome proxies are not running the current version:* emoji-696d9d8f95-8wrmg (stable-2.11.1)* vote-bot-6d7677bb68-c98kb(stable-2.11.1)* voting-ff4c54b8d-rdtmk(stable-2.11.1)* web-5f86686c4d-qh5bz(stable-2.11.1)see https://linkerd.io/2.11/checks/#l5d-data-plane-version for hints
√ data plane and cli versions match
√ data plane pod labels are configured correctly
√ data plane service labels are configured correctly
√ data plane service annotations are configured correctly
√ opaque ports are properly annotatedStatus check results are √
前言 前面我们都是自己编写 LED 灯驱动,其实像 LED 灯这样非常基础的设备驱动,Linux 内 核已经集成了。Linux 内核的 LED 灯驱动采用 platform 框架,因此我们只需要按照要求在设备 树文件中添加相应的 LED 节点即可,本章我们就来学…
目录 一、部署信息
二、部署LVS-DR模式
三、测试
四、DR模式 LVS负载均衡群集 一、部署信息
DR 服务器:172.16.114.70 Web 服务器1:172.16.114.80 Web 服务器2:172.16.114.60 vip:172.16.114.200 客户端:172.16.11…