Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

369 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

kube-agent Helm Chart 배포 및 설치 가이드

사전 환경 테스트

  • 아래 명령어로 helm 버전 조회, 3.2 이상 지원
helm version

version.BuildInfo{Version:"v3.x", GitCommit:"xxx", GitTreeState:"clean", GoVersion:"go1.20.8"}

  • whatap helm repo 에 대한 네트워크 연결 테스트
curl https://whatap.github.io/helm/ping

pong

chart 설치

  1. 와탭 Helm 레포지터리 추가
helm repo add whatap https://whatap.github.io/helm/
helm repo update

kube 1.13.2 RBAC 변경 안내

1.13.2부터 K8s Agent와 OpenAgent ClusterRole의 기본 nonResourceURLs["*"]이며 verbs도 ["*"]입니다. 이는 kube-apiserver의 모든 non-resource endpoint에 접근할 수 있는 넓은 권한입니다. 조직의 최소 권한 정책상 제한이 필요하면 설치 manifest의 해당 ClusterRole 규칙을 필요한 경로만 남기도록 별도 관리하십시오.

  1. values.yaml(설치에 필요한 기본 설정파일) 생성
  • 기본 values.yaml 구성
whatap:
license:
host:
port:
hostNetworkEnabled: falsecollect_apiserver_metric_by_leader: falsecollect_custom_resources: falsecollect_custom_resources_interval: 300000addon:
npm:
enabled: falsegpu:
enabled: falseimage: "nvcr.io/nvidia/k8s/dcgm-exporter:2.1.8-2.4.0-rc.3-ubuntu18.04"apiserver_monitoring:
enabled: falseclient_tls_verify:
etcd_monitoring:
enabled: falseetcd_ca_cert_path: "/etc/kubernetes/pki/etcd/ca.crt"etcd_client_cert_path: "/etc/kubernetes/pki/etcd/server.crt"etcd_client_key_path: "/etc/kubernetes/pki/etcd/server.key"imagePullSecret:
name:
containerRuntime: "containerd"daemonSetNpm:
name: whatap-npm-agentlabel: whatap-npm-agentcontainers:
npmAgent:
name: whatap-npm-agentimage: "whatap/k8s_npm:latest"requests:
memory: "300Mi"cpu: "200m"limits:
memory: "350Mi"cpu: "200m"daemonSet:
name: whatap-node-agentlabel: whatap-node-agenttolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}initContainers:
nodeDebugger:
enabled: truename: whatap-node-debugimage: "whatap/kube_mon"containers:
nodeHelper:
name: whatap-node-helperimage: "whatap/kube_mon"requests:
memory: "100Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
collect_nfs_disk_enabled: truecollect_kube_node_process_metric_enabled: falsecollect_kube_node_process_metric_target_list: "kubelet,containerd,dockerd,crio,coredns,kube-proxy,aws-k8s-agent,kube-apiserver,etcd,kube-controller,kube-scheduler"debug: falsenodeAgent:
name: whatap-node-agentimage: "whatap/kube_mon"requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
log_parser_containerd_std_enabled: falsecollect_kube_node_process_metric_enabled: falsedebug: falsecount_interval: 5000deployment:
name: whatap-master-agentlabel: whatap-master-agentreplicas: 1tolerations:
- key: "node-role.kubernetes.io/master"effect: NoSchedule
- key: "node-role.kubernetes.io/control-plane"effect: NoScheduleaffinity: {}containers:
controlPlaneHelper:
enabled: truedebug: falsename: whatap-control-plane-helperimage: whatap/kube_monport: 9496resources:
requests:
memory: "500Mi"cpu: "500m"limits:
memory: "500Mi"cpu: "500m"masterAgent:
name: whatap-master-agentimage: "whatap/kube_mon"port: 6600resources:
requests:
memory: "300Mi"cpu: "100m"limits:
memory: "350Mi"cpu: "200m"envs:
debug: falseclusterrole:
extraResources:
  • 사용자 CONTAINER-RUNTIME 확인
kubectl get nodes -o wide

containerRuntime.png

  • values.yaml
containerRuntime: #CONTAINER-RUNTIMEwhatap:
license: #WHATAP-LICENESE-KEYhost: "13.124.11.223/13.209.172.35"port: "6600"
  1. 에이전트 어플리케이션 설치

에이전트를 처음 설치하는 사용자는 아래와 같이 설치

helm install whatap-kube-agent whatap/kube -f values.yaml

기존 와탭 쿠버네티스 에이전트 사용자인 경우 clean install 을 위해 아래 명령어 입력

kubectl delete ns whatap-monitoring
kubectl delete clusterrole whatap
kubectl delete clusterrolebinding whatap
helm install whatap-kube-agent whatap/kube -f values.yaml

에이전트 업데이트 및 삭제

  • release 업그레이드(와탭 쿠버네티스 에이전트 어플리케이션 업데이트)
helm upgrade whatap-kube-agent whatap/kube -f values.yaml
  • release 삭제(와탭 쿠버네티스 에이전트 어플리케이션 삭제)
helm uninstall whatap-kube-agent

트러블 슈팅

문제: "whatap" already exists with the same configuration, skipping

원인

  • 이미 whatap 이라는 이름으로 다른 Helm 레포지터리가 추가되어 있는 경우.

해결방법

  • 기존에 존재하는 whatap 레포지터리 삭제후 설치 진행
helm repo remove whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: Namespace "whatap-monitoring" in namespace "" exists and cannot be imported into the current release"

원인:

  • 이미 클러스터에 whatap-monitoring 이라는 네임스페이스가 존재, 사용자가 yaml 로 와탭 쿠버 에이전트를 이미 설치한 경우 발생

해결방법

  • 기존에 존재하는 whatap-monitoring 및 관련 리소스 삭제
kubectl delete namespace whatap-monitoring
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

문제: "Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "whatap" in namespace "" exists and cannot be imported into the current release"

원인:

  • 클러스터에 clusterrole,clusterrolebinding 리소스가 이미 존재

해결방법

  • 기존에 존재하는 관련 리소스 삭제
kubectl delete clusterrolebinding whatap
kubectl delete clusterrole whatap

추가 옵션 설정

와탭 쿠버네티스 에이전트를 설정하기 위한 values.yaml 파일 설정 항목입니다.

주요 설정 항목

values.yaml 파일에서 사용자가 수정할 수 있는 주요 설정 항목 Whatap, 컨테이너 런타임 선택, 에이전트 배포를 위한 daemonSet,deployment에 대한 옵션 설명

KeyTypeDefault ValueDescription
whatap.licenseString# <license-key>Whatap 라이센스 키
whatap.hostString# <whatap-server-host>Whatap 서버의 호스트 주소
whatap.portInt# <whatap-server-port>Whatap 포트 번호
whatap.portInt# <whatap-server-port>Whatap 포트 번호
containerRuntimeString"docker"사용 중인 컨테이너 런타임. "docker", "containerd", "crio" 중 선택
imagePullSecret.nameStringnullimagePullSecret
daemonSet.nameStringwhatap-node-agentDaemonSet의 이름
daemonSet.labelStringwhatap-node-agentDaemonSet에 지정할 라벨
daemonSet.initContainers.nodeDebugger.enabledBooltrueWhatap 노드 디버거 컨테이너 활성화 여부
daemonSet.containers.nodeHelper.imageStringwhatap/kube_monnodeHelper 컨테이너의 이미지.
daemonSet.containers.nodeHelper.requests.memoryString100MinodeHelper MEMORY request
daemonSet.containers.nodeHelper.requests.cpuString100mnodeHelper CPU request
daemonSet.containers.nodeHelper.limits.memoryString350MinodeHelper MEMORY limit
daemonSet.containers.nodeHelper.limits.cpuString200mnodeHelper CPU limit
daemonSet.containers.nodeAgent.imageStringwhatap/kube_monnodeAgent 컨테이너의 이미지
daemonSet.containers.nodeAgent.requests.memoryString300MinodeAgent MEMORY request
daemonSet.containers.nodeAgent.requests.cpuString100mnodeAgent CPU request
daemonSet.containers.nodeAgent.limits.memoryString350MinodeAgent MEMORY limit
daemonSet.containers.nodeAgent.limits.cpuString200mnodeAgent CPU limit
deployment.nameStringwhatap-master-agentDeployment의 이름
deployment.labelStringwhatap-master-agentDeployment에 지정할 라벨
deployment.replicasInt1Deployment의 replica 수
deployment.containers.controlPlaneHelper.enabledBooleantruewhatap-control-plane-helper 컨테이너를 활성화 여부
deployment.containers.controlPlaneHelper.imageString"whatap/kube_mon"controlPlaneHelper 컨테이너의 이미지
deployment.containers.controlPlaneHelper.portString9496controlPlaneHelper 컨테이너의 포트 번호입니다
deployment.containers.controlPlaneHelper.resources.requests.memoryString"300Mi"controlPlaneHelper 컨테이너 MEMORY request
deployment.containers.controlPlaneHelper.resources.requests.cpuString"100m"controlPlaneHelper 컨테이너 CPU request
deployment.containers.controlPlaneHelper.resources.limits.memoryString"350Mi"controlPlaneHelper 컨테이너 MEMORY limit
deployment.containers.controlPlaneHelper.resources.limits.cpuString"200m"controlPlaneHelper 컨테이너 CPU limit
deployment.containers.masterAgent.nameStringwhatap-master-agentmasterAgent 컨테이너 이름
deployment.containers.masterAgent.imageString"whatap/kube_mon"masterAgent 컨테이너 이미지
deployment.containers.masterAgent.portInt6600masterAgent 컨테이너 포트 번호
deployment.containers.masterAgent.resources.requests.memoryString"300Mi"masterAgent 컨테이너 MEMORY request
deployment.containers.masterAgent.resources.requests.cpuString"100m"masterAgent 컨테이너 CPU request
deployment.containers.masterAgent.resources.limits.memoryString"350Mi"masterAgent 컨테이너 MEMORY limit
deployment.containers.masterAgent.resources.limits.cpuString"200m"masterAgent 컨테이너 CPU request
gpuEnabledBooleanfalseEnables GPU if set to true. This is used to enable hardware acceleration for applications that support it.
istioEnabledBooleanfalseEnables Istio automatic injection if set to true. This is useful for deploying applications that benefit from Istio's service mesh capabilities.
k8sOldVersionBooleanfalseSet to true if using an older version of Kubernetes. This helps in managing compatibility issues with deprecated features.

구성 예시

values.yaml 을 이용한 주요 구성 수정 방법

Whatap 기본 설정

whatap:
license: "라이선스 키 입력"host: "와탭 수집서버 호스트 입력"port: "와탭 수집서버 포트 입력"

tolerations 설정 가이드

  • pre-requirement : whatap/kube 차트 1.8.43 이상 버전
  • values.yaml 예시:
daemonSet:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule
deployment:
tolerations:
- key: node-role.kubernetes.io/mastereffect: NoSchedule
- key: node-role.kubernetes.io/control-planeeffect: NoSchedule

Node Affinity 설정 방법

deployment:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: disktypeoperator: Invalues:
- ssd

log - containerStdOut 설정 방법

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
logsink_enabled: true

log - 로그 필터 옵션

  • pre-requirement : whatap/kube 차트 1.8.57 이상 버전
  • 로그 필터 설정 메뉴얼
  • ex) 아래와 같이 설정할 경우 infra, monitoring 네임스페이스의 로그가 수집되고, podName에 prod가 포함된 로그는 제외됩니다.
log_filter_enabled: truelog_filter_allow_list: "*_infra_*, *_monitoring_*"log_filter_deny_list: "*prod*_*_*"

에이전트가 설치될 namespace 를 지정할 경우 아래의 방법으로 설치할 수 있습니다.

pre-requirement : whatap/kube 차트 1.7.11 이상 버전

helm search repo whatap --version '>=1.7.11'

결과확인

# 1.7.11 이상인 경우 다음과 같이 출력됨
NAME CHART VERSION APP VERSION DESCRIPTION whatap/kube 1.7.11 1.0 Whatap monitoring components on Kubernetes
# 1.7.11 미만인 경우 다음과 같이 출력됨(helm repo update 로 차드 업데이트) 
No results found

1.8.88 이상 버전인 경우 아래 명령어를 통해 에이전트가 설치될 namespace 를 지정할 수 있습니다.

helm install whatap-kube-agent whatap/kube --create-namespace --namespace <namespace>


배포

1. 차트 검사- 차트 형식, 문법 사전테스트

helm lint charts/kube

==> Linting . 1 chart(s) linted, 0 chart(s) failed

2. 차트 디버깅- 실제 어플리케이션 배포시 문제 발생 여부 체크

helm install whatap-kube-agent charts/kube --dry-run --debug

3. 차트 패키징

helm package charts/kube/

3.현재 디렉토리에 있는 Helm 차트로부터 인덱스 파일 생성

helm repo index --url https://whatap.github.io/helm/ --merge index.yaml .

기타 도움말

## revision 에서 사용하는 values.yaml 확인
helm get values whatap-kube-agent --revision=<조회할 revision>

차트 구조

└── kube
├── Chart.yaml
├── README.md
├── index.yaml
├── templates
│ ├── clusterrole.yaml
│ ├── clusterrolebinding.yaml
│ ├── configmap-master.yaml
│ ├── configmap-node.yaml
│ ├── daemonset.yaml
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── values.yaml
└── kube-*.tgz

About

helm for kuber-agent

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages