k8s集群通过helm部署skywalking
1、安装helm
下载脚本安装
~# curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
~# chmod 700 get_helm.sh
~# ./get_helm.sh
或者下载包进行安装
~# wget https://get.helm.sh/helm-canary-linux-amd64.tar.gz
~# mv helm /usr/local/bin
~# chmod +x /usr/local/bin/helm
2、安装nfs
### 这里就将 nfs-server 安装在 master 节点# 安装 nfs-utils、rpcbind 软件包(===所有节点===)
yum -y install nfs-utils rpcbind# 创建目录
sudo mkdir -p /data/nfs# 添加权限
sudo chmod 777 -R /data/nfs# 编辑文件,添加以下内容
sudo vim /etc/exports
/data/nfs 172.16.10.0/24(rw,no_root_squash,sync)# 重启服务
systemctl start rpcbind && systemctl enable rpcbind
systemctl start nfs && systemctl enable nfs(所有节点)# 配置生效
exportfs -rv# 查看共享目录
sudo showmount -e 192.168.10.100
# 返回值如下,表示创建成功
Export list for 192.168.10.100:
/data/nfs 172.16.10.*
3、安装skypwalk服务
参考链接
1)设置环境变量
# change the release version according to your need
export SKYWALKING_RELEASE_VERSION=4.5.0
# change the release name according to your scenario
export SKYWALKING_RELEASE_NAME=skywalking
# change the namespace to where you want to install SkyWalking
export SKYWALKING_RELEASE_NAMESPACE=default
2)通过Docker Helm repository安装skywalking
编辑配置文件
cd /root/skywalking-kubernetes/chart
cat skywalking/values-my-es.yaml
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.# Default values for skywalking.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.oap:image:tag: 9.6.0storageType: elasticsearchui:image:tag: 9.6.0elasticsearch:enabled: falseconfig: # For users of an existing elasticsearch cluster,takes effect when `elasticsearch.enabled` is falsehost: elasticsearch-es-httpport:http: 9200user: "xxx" # [optional]password: "xxx" # [optional]
kubectl create namespace skywalking
helm install "${SKYWALKING_RELEASE_NAME}" \oci://registry-1.docker.io/apache/skywalking-helm \--version "${SKYWALKING_RELEASE_VERSION}" \-n "${SKYWALKING_RELEASE_NAMESPACE}" \--set oap.image.tag=9.6.0 \--set oap.storageType=elasticsearch \--set ui.image.tag=9.6.0
结果输出如下
NAME: skywalking
LAST DEPLOYED: Sun Dec 24 03:18:33 2023
NAMESPACE: skywalking
STATUS: deployed
REVISION: 1
NOTES:
************************************************************************
* *
* SkyWalking Helm Chart by SkyWalking Team *
* *
************************************************************************Thank you for installing skywalking-helm.Your release is named skywalking.Learn more, please visit https://skywalking.apache.org/Get the UI URL by running these commands:echo "Visit http://127.0.0.1:8080 to use your application"kubectl port-forward svc/skywalking-skywalking-helm-ui 8080:80 --namespace skywalking
#################################################################################
###### WARNING: Persistence is disabled!!! You will lose your data when #####
###### the SkyWalking's storage ES pod is terminated. #####
#################################################################################
查看对应pods
kubectl get pods -n skywalking
NAME READY STATUS RESTARTS AGE
elasticsearch-master-0 1/1 Running 0 34h
elasticsearch-master-1 1/1 Running 0 34h
elasticsearch-master-2 1/1 Running 0 34h
skywalking-skywalking-helm-oap-5c7bc85f97-48rbt 1/1 Running 0 34h
skywalking-skywalking-helm-oap-5c7bc85f97-v74ls 1/1 Running 0 34h
skywalking-skywalking-helm-oap-init-ftc8m 0/1 Completed 0 34h
skywalking-skywalking-helm-ui-b9f69c6fc-wgjvr 1/1 Running 0 34h
3)查看配置文件
A、查看skywalking-skywalking-helm-ui的相关文件内容
depoyment文本内容
~# kubectl edit deployment skywalking-skywalking-helm-ui -n skywalkingapiVersion: apps/v1
kind: Deployment
metadata:annotations:deployment.kubernetes.io/revision: "1"meta.helm.sh/release-name: skywalkingmeta.helm.sh/release-namespace: skywalkingcreationTimestamp: "2023-12-23T19:18:33Z"generation: 1labels:app: skywalkingapp.kubernetes.io/managed-by: Helmchart: skywalking-helm-4.5.0component: uiheritage: Helmrelease: skywalkingname: skywalking-skywalking-helm-uinamespace: skywalkingresourceVersion: "46556645"uid: c0e3217e-4456-4252-b28c-cb53c26e5bf1
spec:progressDeadlineSeconds: 600replicas: 1revisionHistoryLimit: 10selector:matchLabels:app: skywalkingcomponent: uirelease: skywalkingstrategy:rollingUpdate:maxSurge: 25%maxUnavailable: 25%type: RollingUpdatetemplate:metadata:creationTimestamp: nulllabels:app: skywalkingcomponent: uirelease: skywalkingspec:containers:- env:- name: SW_OAP_ADDRESSvalue: http://skywalking-skywalking-helm-oap:12800image: skywalking.docker.scarf.sh/apache/skywalking-ui:9.6.0imagePullPolicy: IfNotPresentname: uiports:- containerPort: 8080name: pageprotocol: TCPresources: {}terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstrestartPolicy: AlwaysschedulerName: default-schedulersecurityContext: {}terminationGracePeriodSeconds: 30
services
~# kubectl edit svc skywalking-skywalking-helm-ui -n skywalkingapiVersion: v1
kind: Service
metadata:annotations:meta.helm.sh/release-name: skywalkingmeta.helm.sh/release-namespace: skywalkingcreationTimestamp: "2023-12-23T19:18:33Z"labels:app: skywalkingapp.kubernetes.io/managed-by: Helmchart: skywalking-helm-4.5.0component: uiheritage: Helmrelease: skywalkingname: skywalking-skywalking-helm-uinamespace: skywalkingresourceVersion: "46556519"uid: b4e3da64-da1a-4dcb-9324-537773ce251a
spec:clusterIP: 10.68.222.100clusterIPs:- 10.68.222.100internalTrafficPolicy: ClusteripFamilies:- IPv4ipFamilyPolicy: SingleStackports:- port: 80protocol: TCPtargetPort: 8080selector:app: skywalkingcomponent: uirelease: skywalkingsessionAffinity: Nonetype: ClusterIP
status:loadBalancer: {}
A、查看skywalking-skywalking-helm-oap的相关文件内容
deployment
~# kubectl edit deployment skywalking-skywalking-helm-oap -n skywalkingapiVersion: apps/v1
kind: Deployment
metadata:annotations:deployment.kubernetes.io/revision: "1"meta.helm.sh/release-name: skywalkingmeta.helm.sh/release-namespace: skywalkingcreationTimestamp: "2023-12-23T19:18:33Z"generation: 1labels:app: skywalkingapp.kubernetes.io/managed-by: Helmchart: skywalking-helm-4.5.0component: oapheritage: Helmrelease: skywalkingname: skywalking-skywalking-helm-oapnamespace: skywalkingresourceVersion: "46557028"uid: 83562701-0540-479d-b45c-72445e0d5bcf
spec:progressDeadlineSeconds: 600replicas: 2revisionHistoryLimit: 10selector:matchLabels:app: skywalkingcomponent: oaprelease: skywalkingstrategy:rollingUpdate:maxSurge: 25%maxUnavailable: 25%type: RollingUpdatetemplate:metadata:creationTimestamp: nullcreationTimestamp: nulllabels:app: skywalkingcomponent: oaprelease: skywalkingspec:affinity:podAntiAffinity:preferredDuringSchedulingIgnoredDuringExecution:- podAffinityTerm:labelSelector:matchLabels:app: skywalkingcomponent: oaprelease: skywalkingtopologyKey: kubernetes.io/hostnameweight: 1containers:- env:- name: JAVA_OPTSvalue: -Dmode=no-init -Xmx2g -Xms2g- name: SW_CLUSTERvalue: kubernetes- name: SW_CLUSTER_K8S_NAMESPACEvalue: skywalking- name: SW_CLUSTER_K8S_LABELvalue: app=skywalking,release=skywalking,component=oap- name: SKYWALKING_COLLECTOR_UIDvalueFrom:fieldRef:apiVersion: v1fieldPath: metadata.uid- name: SW_STORAGEvalue: elasticsearch- name: SW_STORAGE_ES_CLUSTER_NODESvalue: elasticsearch-master:9200image: skywalking.docker.scarf.sh/apache/skywalking-oap-server:9.6.0imagePullPolicy: IfNotPresentlivenessProbe:failureThreshold: 3initialDelaySeconds: 5periodSeconds: 10successThreshold: 1tcpSocket:port: 12800timeoutSeconds: 1terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstinitContainers:- command:- sh- -c- for i in $(seq 1 60); do nc -z -w3 elasticsearch-master 9200 && exit 0 ||sleep 5; done; exit 1image: busybox:1.30imagePullPolicy: IfNotPresentname: wait-for-elasticsearchresources: {}terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilerestartPolicy: AlwaysschedulerName: default-schedulersecurityContext: {}serviceAccount: skywalking-skywalking-helm-oapserviceAccountName: skywalking-skywalking-helm-oapterminationGracePeriodSeconds: 30
service
~# kubectl edit svc skywalking-skywalking-helm-oap -n skywalkingapiVersion: v1
kind: Service
metadata:annotations:meta.helm.sh/release-name: skywalkingmeta.helm.sh/release-namespace: skywalkingcreationTimestamp: "2023-12-23T19:18:33Z"labels:app: skywalkingapp.kubernetes.io/managed-by: Helmchart: skywalking-helm-4.5.0component: oapheritage: Helmrelease: skywalkingname: skywalking-skywalking-helm-oapnamespace: skywalkingresourceVersion: "46556523"uid: 386c9503-7003-447a-94a0-4f9dcd2fa06d
spec:clusterIP: 10.68.169.25clusterIPs:- 10.68.169.25internalTrafficPolicy: ClusteripFamilies:- IPv4ipFamilyPolicy: SingleStackports:- name: grpcport: 11800protocol: TCPtargetPort: 11800- name: restport: 12800protocol: TCPtargetPort: 12800selector:app: skywalkingcomponent: oaprelease: skywalkingsessionAffinity: Nonetype: ClusterIP
status:loadBalancer: {}
C、ingress的配置文件内容
secret
~# kubectl edit secret abc.com-ssl -n skywalkingapiVersion: v1
data:tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUdMakNDQlJhZ0F3SUJBZ0lRQzAzRDZSSTlvbnBXZmhYTkJvNUZmakFOQmdrcWhraUc5dzBCQVFzRkFEQmcKTVFzd0NRWURWUVFHRXdKVlV6RVZNQk1HQTFVRUNoTU1SR2xuYVVObGNuUWdTVzVqTVJrd0Z3WURWUVFMRXhCMwpkM2N1WkdsbmFXTmxjblF1WTI5dE1SOHdIUVlEVlFRREV4WkhaVzlVY25WemRDQlVURk1nVWxOQklFTkJJRWN4Ck1CNFhEVEl6TURVd016QXdNREF3TUZvWERUSTBNRFV3TWpJek5UazFPVm93R3pFWk1CY0dBMVVFQXd3U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QrSVhYOTFnYTRzUlJ3djR6VjhiNE16SU5WZHJkYmFRazluQwp4dXgxVllBcnc3VTVpU1dSSEhaaUFSVWJUU1VMTkp4UURDQzR0em1kQitXNkJvOGoxSllaMm5LRkNxeEg0N0phCmpGZEFMVmNKaVBLR2FTZ2VoalFGVFVFQ2dZQktYam9LaDB0U2RRWkJhM1VFc2V5b2IwSCs2TDBUWWFxSEd1QWkKMW8vMmk1NWd1Yms4RjljcHJJY291eXg0dkl6N1ZmcE4rdUtQWkdEcWl4eWN1Y0VXSTFmcHNkTkxGT2tOS1RBYgplMm9rek5rbmJJM0x0cmw2VlZyRHlnZ1QxRkhTMGppS0tzUElFWDRscjNEdTZQODRRcDd4NVJrbTdYZjJZaC9NCklWU2l5UUtCZ0JiK0plU0lFRmM1czRyRklaYnN0eENCK1dqdk1PczR0RW5NNkp3WXh4TkJmYUdQQUtMWmNCNDMKWTVQblNoT2w0T21RYnZ5RWdHK1o4RFcrN0J2cVVjVE92SGlhb2YzTzZPUjBQdmV4Y3Z0Sldha3RHRVlPT0g2bQpGTWZmZ3QvUkEraUFQay91QllCZVNLWHNGNDhCY3Nsck15TU9rUThpaU02OTQ1WEIxaE5RCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tAVse
immutable: false
kind: Secret
metadata:creationTimestamp: "2023-12-21T14:30:06Z"name: abc.com-sslnamespace: skywalkingresourceVersion: "46095322"
~# kubectl edit ingress skywalking-ui -n skywalkingapiVersion: networking.k8s.io/v1
kind: Ingress
metadata:creationTimestamp: "2023-12-22T11:51:21Z"generation: 3labels:app: skywalkingapp.kubernetes.io/managed-by: Helmchart: skywalking-4.3.0component: uiheritage: Helmk8s.kuboard.cn/name: skywalking-uirelease: skywalkingname: skywalking-uinamespace: skywalkingresourceVersion: "46541768"uid: 9331ed1a-40e0-4fb2-b6a5-370207fb196b
spec:ingressClassName: biking-ingressrules:- host: skywalking-oap-test.abc.comhttp:paths:- backend:service:name: skywalking-skywalking-helm-uiport:number: 80path: /pathType: Prefixtls:- hosts:- skywalking-oap-test.abc.comsecretName: abc.com-ssl
status:loadBalancer:ingress:- ip: 172.16.10.202- ip: 172.16.10.203
D、查看elasticsearch的配置内容
StatefulSet
~# kubectl edit StatefulSet elasticsearch-master -n skywalkingapiVersion: apps/v1
kind: StatefulSet
metadata:annotations:esMajorVersion: "7"meta.helm.sh/release-name: skywalkingmeta.helm.sh/release-namespace: skywalkingcreationTimestamp: "2023-12-23T19:18:33Z"generation: 1labels:app: elasticsearch-masterapp.kubernetes.io/managed-by: Helmchart: elasticsearchheritage: Helmrelease: skywalkingname: elasticsearch-masternamespace: skywalkingresourceVersion: "46556881"uid: 6181350e-d165-43b6-b1df-e2473b928f47
spec:persistentVolumeClaimRetentionPolicy:whenDeleted: RetainwhenScaled: RetainpodManagementPolicy: Parallelreplicas: 3revisionHistoryLimit: 10selector:matchLabels:app: elasticsearch-masterserviceName: elasticsearch-master-headlesstemplate:metadata:creationTimestamp: nulllabels:app: elasticsearch-masterchart: elasticsearchrelease: skywalkingname: elasticsearch-masterspec:affinity:podAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:- labelSelector:matchExpressions:- key: appoperator: Invalues:- elasticsearch-mastertopologyKey: kubernetes.io/hostnameautomountServiceAccountToken: truecontainers:- env:- name: node.namevalueFrom:fieldRef:apiVersion: v1fieldPath: metadata.name- name: cluster.initial_master_nodesvalue: elasticsearch-master-0,elasticsearch-master-1,elasticsearch-master-2,- name: discovery.seed_hostsvalue: elasticsearch-master-headless- name: cluster.namevalue: elasticsearch- name: network.hostvalue: 0.0.0.0- name: cluster.deprecation_indexing.enabledvalue: "false"- name: ES_JAVA_OPTSvalue: -Xmx1g -Xms1g- name: node.datavalue: "true"- name: node.ingestvalue: "true"- name: node.mastervalue: "true"- name: node.mlvalue: "true"- name: node.remote_cluster_clientvalue: "true"image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3imagePullPolicy: IfNotPresentname: elasticsearchports:- containerPort: 9200name: http protocol: TCP- containerPort: 9300name: transportprotocol: TCPreadinessProbe:exec:command:- bash- -c- |set -e# If the node is starting up wait for the cluster to be ready (request params: "wait_for_status=green&timeout=1s" )# Once it has started only check that the node itself is respondingSTART_FILE=/tmp/.es_start_file# Disable nss cache to avoid filling dentry cache when calling curl# This is required with Elasticsearch Docker using nss < 3.52export NSS_SDB_USE_CACHE=nohttp () {local path="${1}"local args="${2}"set -- -XGET -sif [ "$args" != "" ]; thenset -- "$@" $argsfiif [ -n "${ELASTIC_PASSWORD}" ]; thenset -- "$@" -u "elastic:${ELASTIC_PASSWORD}"ficurl --output /dev/null -k "$@" "http://127.0.0.1:9200${path}"}if [ -f "${START_FILE}" ]; thenecho 'Elasticsearch is already running, lets check the node is healthy'HTTP_CODE=$(http "/" "-w %{http_code}")RC=$?if [[ ${RC} -ne 0 ]]; thenecho "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} http://127.0.0.1:9200/ failed with RC ${RC}"exit ${RC}fi# ready if HTTP code 200, 503 is tolerable if ES version is 6.xif [[ ${HTTP_CODE} == "200" ]]; thenexit 0elif [[ ${HTTP_CODE} == "503" && "7" == "6" ]]; thenexit 0elseecho "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} http://127.0.0.1:9200/ failed with HTTP code ${HTTP_CODE}"exit 1fielseecho 'Waiting for elasticsearch cluster to become ready (request params: "wait_for_status=green&timeout=1s" )'if http "/_cluster/health?wait_for_status=green&timeout=1s" "--fail" ; thentouch ${START_FILE}exit 0elseecho 'Cluster is not yet ready (request params: "wait_for_status=green&timeout=1s" )'exit 1fififailureThreshold: 3initialDelaySeconds: 10periodSeconds: 10successThreshold: 3timeoutSeconds: 5resources:limits:cpu: "1"memory: 2Girequests:cpu: 100mmemory: 2GisecurityContext:capabilities:drop:- ALLrunAsNonRoot: truerunAsUser: 1000terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstenableServiceLinks: trueinitContainers:- command:- sysctl- -w - vm.max_map_count=262144image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3imagePullPolicy: IfNotPresentname: configure-sysctlresources: {}securityContext:privileged: truerunAsUser: 0terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilerestartPolicy: AlwaysschedulerName: default-schedulersecurityContext:fsGroup: 1000runAsUser: 1000terminationGracePeriodSeconds: 120updateStrategy:type: RollingUpdate
service
~# kubectl edit service elasticsearch-master -n skywalkingapiVersion: v1
kind: Service
metadata:annotations:meta.helm.sh/release-name: skywalkingmeta.helm.sh/release-namespace: skywalkingcreationTimestamp: "2023-12-23T19:18:33Z"labels:app: elasticsearch-masterapp.kubernetes.io/managed-by: Helmchart: elasticsearchheritage: Helmrelease: skywalkingname: elasticsearch-masternamespace: skywalkingresourceVersion: "46556527"uid: 7e6f70f2-de8f-46e6-8b2d-0421e32ec4f7
spec:clusterIP: 10.68.47.138clusterIPs:- 10.68.47.138internalTrafficPolicy: ClusteripFamilies:- IPv4ipFamilyPolicy: SingleStackports:- name: httpport: 9200protocol: TCPtargetPort: 9200- name: transportport: 9300protocol: TCPtargetPort: 9300selector:app: elasticsearch-masterchart: elasticsearchrelease: skywalkingsessionAffinity: Nonetype: ClusterIP
status:loadBalancer: {}
检测脚本:
bash -c 'set -e
# If the node is starting up wait for the cluster to be ready (request params: "wait_for_status=green&timeout=1s" )
# Once it has started only check that the node itself is responding
START_FILE=/tmp/.es_start_file# Disable nss cache to avoid filling dentry cache when calling curl
# This is required with Elasticsearch Docker using nss < 3.52
export NSS_SDB_USE_CACHE=nohttp () {local path="${1}"local args="${2}"set -- -XGET -sif [ "$args" != "" ]; thenset -- "$@" $argsfiif [ -n "${ELASTIC_PASSWORD}" ]; thenset -- "$@" -u "elastic:${ELASTIC_PASSWORD}"ficurl --output /dev/null -k "$@" "http://127.0.0.1:9200${path}"
}if [ -f "${START_FILE}" ]; thenecho 'Elasticsearch is already running, lets check the node is healthy'HTTP_CODE=$(http "/" "-w %{http_code}")RC=$?if [[ ${RC} -ne 0 ]]; thenecho "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} http://127.0.0.1:9200/ failed with RC ${RC}"exit ${RC}fi# ready if HTTP code 200, 503 is tolerable if ES version is 6.xif [[ ${HTTP_CODE} == "200" ]]; thenexit 0elif [[ ${HTTP_CODE} == "503" && "7" == "6" ]]; thenexit 0elseecho "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} http://127.0.0.1:9200/ failed with HTTP code ${HTTP_CODE}"exit 1fielseecho 'Waiting for elasticsearch cluster to become ready (request params: "wait_for_status=green&timeout=1s" )'if http "/_cluster/health?wait_for_status=green&timeout=1s" "--fail" ; thentouch ${START_FILE}exit 0elseecho 'Cluster is not yet ready (request params: "wait_for_status=green&timeout=1s" )'exit 1fi
fi
'
4、添加客户端agent
下载apache-skywalking-apm-es7后,解压文件,将解压目录下的agent目录,存放到nfs下,然后挂载到java对应的pod服务,并将对应的文件加目录挂载到pods的/usr/skywalking/agent/下
8.7.0版本
wget https://archive.apache.org/dist/skywalking/8.7.0/apache-skywalking-apm-es7-8.7.0.tar.gz
tar -xf apache-skywalking-apm-es7-8.7.0.tar.gz
mv apache-skywalking-apm-es7-8.70/agent/* /data/nfs/skywalking-agent/
9.1.0版本
wget https://archive.apache.org/dist/skywalking/java-agent/9.1.0/apache-skywalking-java-agent-9.1.0.tgz
tar -xf apache-skywalking-java-agent-9.1.0.tgz
mv skywalking-agent/* /data/nfs/
启动一个pods
deployment文本内容
~# kubectl edit deployment financial-management -n testapiVersion: apps/v1
kind: Deployment
metadata:annotations:deployment.kubernetes.io/revision: "9"k8s.kuboard.cn/displayName: financial-managementkubectl.kubernetes.io/last-applied-configuration: |{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"k8s.kuboard.cn/displayName":"financial-management"},"labels":{"k8s.kuboard.cn/layer":"platform","k8s.kuboard.cn/name":"financial-management"},"name":"financial-management","namespace":"biking"},"spec":{"progressDeadlineSeconds":600,"replicas":1,"revisionHistoryLimit":10,"selector":{"matchLabels":{"k8s.kuboard.cn/name":"financial-management"}},"strategy":{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"},"template":{"metadata":{"labels":{"k8s.kuboard.cn/name":"financial-management"}},"spec":{"containers":[{"env":[{"name":"TZ","value":"Asia/Shanghai"},{"name":"NACOS","value":"172.16.10.20"}],"image":"harbor.cuiwjrpcvi.com/bktest/financial-management:test","imagePullPolicy":"Always","name":"financial-management","ports":[{"containerPort":8081,"name":"msag7","protocol":"TCP"}],"resources":{},"terminationMessagePath":"/test/termination-log","terminationMessagePolicy":"File"}],"dnsPolicy":"ClusterFirst","hostAliases":[{"hostnames":["rocketmq","kafka","redis"],"ip":"172.16.10.20"}],"imagePullSecrets":[{"name":"harbor-secret"}],"restartPolicy":"Always","schedulerName":"default-scheduler","securityContext":{},"terminationGracePeriodSeconds":30}}}}creationTimestamp: "2023-06-27T08:19:05Z"generation: 11labels:k8s.kuboard.cn/layer: platformk8s.kuboard.cn/name: financial-managementname: financial-managementnamespace: testresourceVersion: "46557189"uid: 89bc052f-e343-489d-bef9-caa7585c8d1e
spec:progressDeadlineSeconds: 600replicas: 1revisionHistoryLimit: 10selector:matchLabels:k8s.kuboard.cn/name: financial-managementstrategy:rollingUpdate:maxSurge: 25%maxUnavailable: 25%type: RollingUpdatetemplate:metadata:annotations:kubectl.kubernetes.io/restartedAt: "2023-12-23T23:21:18+04:00"creationTimestamp: nulllabels:k8s.kuboard.cn/name: financial-managementspec:containers:- env:- name: TZvalue: Asia/Shanghai- name: NACOSvalue: 172.16.10.20- name: BUILD_TAGvalue: ${BUILD_TAG}- name: NAMESPACEvalue: test- name: JAVA_TOOL_OPTIONSvalue: -javaagent:/usr/skywalking/agent/skywalking-agent.jar- name: SW_AGENT_NAMEvalue: financial-management- name: SW_AGENT_COLLECTOR_BACKEND_SERVICESvalue: skywalking-skywalking-helm-oap.skywalking.svc.cluster.local:11800- name: SW_AGENT_FORCE_TLSvalue: "true"image: harbor.cuiwjrpcvi.com/bktest/financial-management:testimagePullPolicy: Alwaysname: financial-managementports:- containerPort: 8081name: msag7protocol: TCPresources: {}terminationMessagePath: /test/termination-logterminationMessagePolicy: FilevolumeMounts:- mountPath: /usr/skywalking/agent/name: volume-2bhb2subPath: skywalking-agentdnsPolicy: ClusterFirsthostAliases:- hostnames:- rocketmq- kafka- redisip: 172.16.10.20imagePullSecrets:- name: harbor-secretrestartPolicy: AlwaysschedulerName: default-schedulersecurityContext: {}terminationGracePeriodSeconds: 30volumes:- name: volume-2bhb2nfs:path: /data/nfsserver: 172.16.10.20
service文本内容
~# kubectl edit svc financial-management -n testapiVersion: v1
kind: Service
metadata:annotations:kubectl.kubernetes.io/last-applied-configuration: |{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"financial-management","k8s.kuboard.cn/name":"financial-management"},"name":"financial-management","namespace":"biking"},"spec":{"ports":[{"name":"kjmfca","port":8081,"protocol":"TCP","targetPort":8081}],"selector":{"k8s.kuboard.cn/name":"financial-management"},"sessionAffinity":"None","type":"ClusterIP"}}creationTimestamp: "2023-06-27T08:19:05Z"labels:app.kubernetes.io/instance: financial-managementk8s.kuboard.cn/name: financial-managementname: financial-managementnamespace: testresourceVersion: "5855"uid: 4620bbc0-f8bd-48d9-8ad6-41a69939c31d
spec:clusterIP: 10.68.140.221clusterIPs:- 10.68.140.221internalTrafficPolicy: ClusteripFamilies:- IPv4ipFamilyPolicy: SingleStackports:- name: kjmfcaport: 8081protocol: TCPtargetPort: 8081selector:k8s.kuboard.cn/name: financial-managementsessionAffinity: Nonetype: ClusterIP
status:loadBalancer: {}
依次类推部署其他的pod
5、登录ui控制台
https://skywalking-oap-test.abc.com/General-Service/Services
service图形入下
Topology图形如下
查看实例的图形
相关文章:
k8s集群通过helm部署skywalking
1、安装helm 下载脚本安装 ~# curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 ~# chmod 700 get_helm.sh ~# ./get_helm.sh或者下载包进行安装 ~# wget https://get.helm.sh/helm-canary-linux-amd64.tar.gz ~# mv helm …...
介绍一款PDF在线工具
PDF是我们日常工作中的一种常见格式,其处理也是我们工作的重要基础性环节,一款可靠的处理工具显得十分重要。 完全免费、易于使用、丰富的PDF处理工具,包括:合并、拆分、压缩、转换、旋转和解锁PDF文件,以及给PDF文件…...
docker学习——汇总版
历时一个月将docker系统的学习了一下,并且记录了详细的笔记和实践过程。 希望能对工作需要的小伙伴们有所帮助~ docker基础篇 docker学习(一、docker与VM对比) docker学习(二、安装docker) docker学习(…...
百度沧海文件存储CFS推出新一代Namespace架构
随着移动互联网、物联网、AI 计算等技术和市场的迅速发展,数据规模指数级膨胀,对于分布式文件系统作为大规模数据场景的存储底座提出了更高的要求。已有分布式文件系统解决方案存在着短板,只能适应有限的场景: >> 新型分布式…...
16-网络安全框架及模型-BiBa完整性模型
目录 BiBa完整性模型 1 背景概述 2 模型原理 3 主要特性 4 优势和局限性 5 应用场景 BiBa完整性模型 1 背景概述 Biba完整性模型是用于保护数据完整性的模型,它的主要目标是确保数据的准确性和一致性,防止未授权的修改和破坏。在这个模型中&#…...
ssm基于冲突动态监测算法的健身房预约系统的设计与实现论文
摘 要 传统办法管理信息首先需要花费的时间比较多,其次数据出错率比较高,而且对错误的数据进行更改也比较困难,最后,检索数据费事费力。因此,在计算机上安装健身房预约系统软件来发挥其高效地信息处理的作用ÿ…...
基于 Element UI 适用于 Vue 2 版本的虚拟列表选择器组件el-select
背景:在某些使用情况下,单个选择器可能最终加载数万行数据。 将这么多的数据渲染至 DOM 中可能会给浏览器带来负担,从而造成性能问题。 ——vue3element-plus有现成的轮子。而vue2element-ui没有。 以下 文章大部分 摘自 源组件中的README.md…...
java常见面试题:请解释一下Java中的常用分布式框架,如Spring Boot、Dubbo等。
下面我将详细介绍Java中的两个常用分布式框架:Spring Boot和Dubbo。 1. Spring Boot Spring Boot是一个用于创建独立、可运行的、生产级别的Spring应用程序的框架。它简化了Spring应用程序的创建和部署,使得开发人员能够专注于编写业务逻辑,…...
FreeRTOS列表与列表项相关知识总结以及列表项的插入与删除实战
1.列表与列表项概念及结构体介绍 1.1列表项简介 列表相当于链表,列表项相当于节点,FreeRTOS 中的列表是一个双向环形链表 1.2 列表、列表项、迷你列表项结构体 1)列表结构体 typedef struct xLIST { listFIRST_LIST_INTEGRITY_CHECK_VAL…...
07|输出解析:用OutputParser生成鲜花推荐列表
07|输出解析:用OutputParser生成鲜花推荐列表 模型 I/O Pipeline 下面先来看看 LangChain 中的输出解析器究竟是什么,有哪些种类。 LangChain 中的输出解析器 语言模型输出的是文本,这是给人类阅读的。但很多时候,你…...
cfa一级考生复习经验分享系列(十二)
背景:就职于央企金融机构,本科金融背景,一直在传统金融行业工作。工作比较忙,用了45天准备考试,几乎每天在6小时以上。 写在前面的话 先讲一下,整体一级考下来,我觉得知识点多,偏基础…...
【损失函数】SmoothL1Loss 平滑L1损失函数
1、介绍 torch.nn.SmoothL1Loss 是 PyTorch 中的一个损失函数,通常用于回归问题。它是 L1 损失和 L2 损失的结合,旨在减少对异常值的敏感性。 loss_function nn.SmoothL1Loss(reductionmean, beta1.0) 2、参数 size_average (已弃用): 以前用于确定是…...
Go语言中的HTTP重定向
大家好,我是你们可爱的编程小助手,今天我们要一起探讨如何使用Go语言实现HTTP重定向,让我们开始吧! 大家都知道,网站开发中有时候需要将用户的请求从一个URL导向到另一个URL。比如说,你可能想将旧的URL结构…...
ORACLE P6 v23.12 最新虚拟机(VM)全套系统环境分享
引言 根据上周的计划,我简单制作了两套基于ORACLE Primavera P6 最新发布的23.12版本预构建了虚拟机环境,里面包含了全套P6 最新版应用服务 此虚拟机仅用于演示、培训和测试目的。如您在生产环境中使用此虚拟机,请先与Oracle Primavera销售代…...
鸿蒙开发ArkTS基础学习-开发准备工具配置
文章目录 前言1. 准备工作2.开发文档3.鸿蒙开发路径一.详情介绍二.DevEco Studio安装详解-开发环境搭建2.1配置开发环境欢迎各位读者阅读本文,今天我们将介绍鸿蒙(HarmonyOS)应用开发的入门步骤,特别是在准备工作和开发环境搭建方面的重要信息。本文将对鸿蒙官方网站的关键…...
WEB 3D技术 three.js 雾 基础使用讲解
本文 我们说一下 雾 在three.js中有一个 Fog类 它可以创建线性雾的一个效果 她就是模仿现实世界中 雾的一个效果 你看到远处物体会组件模糊 直到完全被雾掩盖 在 three.js 中 有两种雾的形式 一种是线性的 一种是指数的 个人觉得 线性的会看着自然一些 他是 从相机位置开始 雾…...
Python中的网络编程
IP地址 IPv4IPv6查看本机的IP地址 win ipconfiglinux ifconfig ping命令 ping www.baidu.com 查看是否能连通指定的网站ping 192.168.1.222 查看是否能连通指定的IP Port端口 0-65535 TCP/IP协议 传输数据之前要建立连接,通过三次握手建立: 客户端 --&g…...
uni-app js语法
锋哥原创的uni-app视频教程: 2023版uniapp从入门到上天视频教程(Java后端无废话版),火爆更新中..._哔哩哔哩_bilibili2023版uniapp从入门到上天视频教程(Java后端无废话版),火爆更新中...共计23条视频,包括:第1讲 uni…...
【论文阅读笔记】Detecting Camouflaged Object in Frequency Domain
1.论文介绍 Detecting Camouflaged Object in Frequency Domain 基于频域的视频目标检测 2022年发表于CVPR [Paper] [Code] 2.摘要 隐藏目标检测(COD)旨在识别完美嵌入其环境中的目标,在医学,艺术和农业等领域有各种下游应用。…...
Mysql(5日志备份恢复)
一.日志管理 MySQL 的日志默认保存位置为 /usr/local/mysql/data 先看下mysql的日志文件有无: 修改配置文件添加:错误日志,用来记录当MySQL启动、停止或运行时发生的错误信息,默认已开启 修改配置文件添加:通用查…...
MR实战:实现数据去重
文章目录 一、实战概述二、提出任务三、完成任务(一)准备数据文件1、在虚拟机上创建文本文件2、上传文件到HDFS指定目录 (二)实现步骤1、Map阶段实现(1)创建Maven项目(2)添加相关依赖…...
JVM 常用知识和面试题
1. 什么是JVM内存结构? jvm将虚拟机分为5大区域,程序计数器、虚拟机栈、本地方法栈、java堆、方法区; 程序计数器:线程私有的,是一块很小的内存空间,作为当前线程的行号指示器,用于记录当前虚拟…...
【教3妹学编程-算法题】一年中的第几天
3妹:“太阳当空照,花儿对我笑,小鸟说早早早,你为什么背上炸药包” 2哥 :3妹,什么事呀这么开森。 3妹:2哥你看今天的天气多好啊,经过了一周多的寒潮,天气总算暖和些了。 2哥ÿ…...
ramdump 中的memory统计
0. 前言 ramdump是指某个时刻系统或者子系统发生crash等异常,系统将内存中的数据通过一定的方式保存下来,相当于一个系统内存快照,用以开发者离线分析系统异常问题。 ramdump 工具中有很多内存统计的脚本,本文逐一剖析内存相关的…...
Element-Ui树形数据懒加载,删除到最后一个空数组不刷新问题
使用elemenui树形删除数据的时候刷新页面,我在网上找了好多方法,要么没用,要么都是部分代码,自己又看不懂,不得不硬着头皮看源码,发现了有个方法可以刷新。 使用elemenui树形删除数据的时候刷新页面。源码里…...
基于NASM搭建一个能编译汇编语言的汇编软件工具环境(利用NotePad++)
文章目录 一、创建汇编语言源程序二、Notepad的下载、安装、使用三、下载和安装编译器NASM3.1 下载NASM编译器3.2 安装并配置环境变量 四、编译汇编语言源程序(使用命令)五、下载和使用配套源码及工具六、将编译功能集成到Notepad 一、创建汇编语言源程序…...
使用setoolkit制作钓鱼网站并结合dvwa靶场储存型XSS漏洞利用
setoolkit是一款kali自带的工具 使用命令启动 setoolkit 1) Social-Engineering Attacks 1) 社会工程攻击 2) Penetration Testing (Fast-Track) 2) 渗透测试(快速通道) 3) Third Party Module…...
计算机组成原理-总线概述
文章目录 总线简图总线的物理实现总览总线定义总线的特性总线的分类按数据格式分类串行总线并行总线 按总线功能分类注意系统总线的进一步分类 总线的结构单总线的机构双总线的结构三总线的结构四总线的结构 小结 总线简图 总线的物理实现 如果该为数据总线,那么当…...
三角函数两角和差公式推导
一.几何推理 1.两角和公式 做一斜边为1的直角△ABC,任意旋转非 k Π , k N kΠ,kN kΠ,kN,补充如图,令 ∠ A B C ∠ α , ∠ C B F ∠ β ∠ABC∠α,∠CBF∠β ∠ABC∠α,∠CBF∠β ∴ ∠ D B F ∠ D B A ∠ α ∠ β 90 , ∠ D A …...
HarmonyOS page生命周期函数讲解
下面 我们又要看一个比较重要的点了 页面生命周期 页面组件有三个生命周期 onPageShow 页面显示时触发 onPageHide 页面隐藏时触发 onBackPress 页面返回时触发 这里 我们准备两个组件 首先是 index.ets 参考代码如下 import router from ohos.router Entry Component struc…...
安徽建设厅网站节能北备案/商业软文代写
Java 类库概念: Java 的应用程序接口 (API) 以包的形式来组织,每个包提供了大量的相关类、接口和异常处理类,这些包的集合就是 Java 的类库包名以 Java 开始的包是 Java 核心包 (Java Core Package) ;包名以 Javax 开始的包是 Jav…...
帮助中心网站源码/直通车推广计划方案
Python内置了整数、复数、浮点数三种数字类型。整数 整数是没有小数部分的数值,与数学上的一样: >>> 1 1 >>> -1 -1 整数没有大小限制,只要你的内存足够大,就可以创建任意大小的整数: >>> …...
广德县建设协会网站/企业模板建站
html中form表示一个表单,用来把一系列的控件包围起来,然后再统一发送这些数据到目标,比如最常见的注册,你说需要填写的资料,都是被封装在form里的,填写完毕后,提交form内的内容,如果不再form内则不会提交而table则是用来布局的 当你填写资料的时候 你有没有发现页面所提供的文本…...
做58网站怎么赚钱/网址怎么创建
关于编写出现1064的问题 原因如下 sql 语句中的字段和MySQL数据库关键字冲突,如update 、create、select、database等; sql语句标点错误,如单双引号误写,分号中文; 编码格式错误; 写sql语句的时候&…...
网站建设的客户在哪里/新人跑业务怎么找客户
以下的文章主要介绍的是Oracle建立DBLINK的实际操作步骤的经验总结,我们首先建立了其相关的测试条件,你如果对其有兴趣的话你就可以点击以下的文章进行观看了。 下面就是文章的具体内容介绍。测试条件:假设某公司总部在北京,新疆有…...
南宁网站开发价格/免费建站网站一站式
先说下改变窗体样式的代码,如下: this.FormBorderStyle System.Windows.Forms.FormBorderStyle.None; 实现点击winform窗体,运用鼠标就可以移动窗体,而不需要点击窗体边框处。 using System.Runtime.InteropServices; 在窗体内加上以下代码&…...