참고 문서

https://docs.ansible.com/projects/ansible/latest/installation_guide/installation_distros.html#installing-ansible-on-ubuntu

https://developer.hashicorp.com/terraform/install#linux

 

 

ubuntu 24.04 LTS 설치
######## Ansible 2.9.6 ########
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible

######## Terraform ########
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

 

'리눅스 > Debian' 카테고리의 다른 글

bandit 풀이  (0) 2023.08.09
확인 관련 명령어 정리  (0) 2023.08.09
iptables  (0) 2023.08.07
ownCloud  (0) 2023.08.07
LAMP  (0) 2023.08.07
참고 문서

https://docs.cilium.io/en/stable/installation/k8s-install-kubeadm/

 

 

설치
helm repo add cilium https://helm.cilium.io/
helm repo update
helm install cilium cilium/cilium --version 1.18.6 --namespace kube-system

 

 

Trouble Shooting
Warning FailedCreatePodSandBox 1s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_coredns-668d6bf9bc-j7ls2_kube-system_33cd6810-2f61-4486-a41c-9767bb9d758f_0(21332be5b577d6cea546383e56e5bbc244edb7fe7c198db92f7eba993627a0ca): error adding pod kube-system_coredns-668d6bf9bc-j7ls2 to CNI network "cilium": plugin type="cilium-cni" failed (add): unable to create endpoint: Cilium API client timeout exceeded

coreDNS에서 cilium API로의 timeout이 발생

 

[root@k8s-master k8s-rocky-crio]# kubectl -n kube-system logs -l k8s-app=cilium --tail=200
...
time=2026-02-03T08:50:25.569836902Z level=error msg="BPF template object creation failed" module=agent.datapath.loader error="failed to compile template program: Failed to compile bpf_lxc.o: exit status 1" bpfHeaderfileHash=9a9d8c4cc1e4345c86adc3ed4a31e28f28beb8721c21ff5b9b04040c562564a7
time=2026-02-03T08:50:25.569849155Z level=error msg="Error while reloading endpoint BPF program" k8sPodName=kube-system/coredns-668d6bf9bc-j7ls2 ipv6="" ipv4=10.0.0.197 containerID=9c1aa29514 datapathPolicyRevision=0 identity=19835 desiredPolicyRevision=1 ciliumEndpointName=kube-system/coredns-668d6bf9bc-j7ls2 containerInterface="" endpointID=235 subsys=endpoint error="failed to compile template program: Failed to compile bpf_lxc.o: exit status 1"
time=2026-02-03T08:50:25.569965163Z level=info msg="generating BPF for endpoint failed, keeping stale directory" k8sPodName=kube-system/coredns-668d6bf9bc-j7ls2 ipv6="" ipv4=10.0.0.197 containerID=9c1aa29514 datapathPolicyRevision=0 identity=19835 desiredPolicyRevision=0 ciliumEndpointName=kube-system/coredns-668d6bf9bc-j7ls2 containerInterface="" endpointID=235 subsys=endpoint error="failed to compile template program: Failed to compile bpf_lxc.o: exit status 1" file-path=235_next_fail
time=2026-02-03T08:50:25.570139111Z level=warn msg="Regeneration of endpoint failed" k8sPodName=kube-system/coredns-668d6bf9bc-j7ls2 ipv6="" ipv4=10.0.0.197 containerID=9c1aa29514 datapathPolicyRevision=0 identity=19835 desiredPolicyRevision=0 ciliumEndpointName=kube-system/coredns-668d6bf9bc-j7ls2 containerInterface="" endpointID=235 subsys=endpoint reason="retrying regeneration" mapSync=31.63µs prepareBuild=107.743µs bpfCompilation=148.232969ms bpfWaitForELF=148.36586ms waitingForLock=2.876µs waitingForCTClean=1.000495ms policyCalculation=44.123µs selectorPolicyCalculation=0s total=150.444915ms endpointPolicyCalculation=32.091µs proxyPolicyCalculation=53.35µs bpfLoadProg=0s waitingForPolicyRepository=210ns proxyWaitForAck=0s proxyConfiguration=6.182µs bpfCompilation=148.232969ms bpfWaitForELF=148.36586ms bpfLoadProg=0s error="failed to compile template program: Failed to compile bpf_lxc.o: exit status 1"
time=2026-02-03T08:50:25.570242947Z level=error msg="endpoint regeneration failed" k8sPodName=kube-system/coredns-668d6bf9bc-j7ls2 ipv6="" ipv4=10.0.0.197 containerID=9c1aa29514 datapathPolicyRevision=0 identity=19835 desiredPolicyRevision=0 ciliumEndpointName=kube-system/coredns-668d6bf9bc-j7ls2 containerInterface="" endpointID=235 subsys=endpoint error="failed to compile template program: Failed to compile bpf_lxc.o: exit status 1"

cilium 파드에서는 failed to compile 발생하여 cilium에서 문제 발생함을 확인

 

[root@k8s-master k8s-rocky-crio]# ls -ld /usr/src/kernels/$(uname -r)
ls -l /usr/src/kernels/$(uname -r) | head
rpm -q kernel-devel-$(uname -r) kernel-headers-$(uname -r)
ls: cannot access '/usr/src/kernels/5.14.0-570.17.1.el9_6.x86_64': No such file or directory
ls: cannot access '/usr/src/kernels/5.14.0-570.17.1.el9_6.x86_64': No such file or directory
package kernel-devel-5.14.0-570.17.1.el9_6.x86_64 is not installed
package kernel-headers-5.14.0-570.17.1.el9_6.x86_64 is not installed

eBPF 프로그램을 컴파일하고 로드하기 위해 필요한 커널 헤더(Kernel Headers)와 소스 파일이 시스템에 없어서 발샘한 문제

 

 

해결
dnf update -y kernel kernel-core kernel-modules kernel-devel kernel-headers
reboot
uname -r
dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

각 노드에서 Kernel Headers와 소스 파일 설치

 

[root@k8s-master ~]# k get po
NAME                                 READY   STATUS    RESTARTS   AGE
cilium-9zj5g                         1/1     Running   2          20h
cilium-envoy-65jn2                   1/1     Running   2          20h
cilium-envoy-7bc2c                   1/1     Running   2          20h
cilium-operator-75cb67ffc7-b7gwl     1/1     Running   3          20h
cilium-operator-75cb67ffc7-cqkw5     1/1     Running   2          20h
cilium-xgwnr                         1/1     Running   2          20h
coredns-668d6bf9bc-h5965             1/1     Running   0          4m17s
coredns-668d6bf9bc-j7ls2             1/1     Running   1          20h

이후 coredns 파드가 정상 기동됨

'k8s' 카테고리의 다른 글

VPA  (0) 2025.12.24
HPA  (0) 2025.12.15
metric server 설치  (0) 2025.09.02
node join 및 delete  (0) 2025.08.28
ansible 을 활용한 k8s 클러스터 구축  (0) 2025.08.01
참고 문서

https://docs.querypie.com/ko/administrator-manual/kubernetes

 

Kubernetes - QueryPie ACP

QueryPie ACP

docs.querypie.com

https://docs.querypie.com/ko/user-manual/multi-agent

 

Multi Agent - QueryPie ACP

QueryPie ACP

docs.querypie.com

 

참고 문서를 따라 연동을 진행하면 아래 흐름 요약과 같이 User가 여러 k8s 클러스터에 접근이 가능하다.

이 프로젝트에서 User는 VMware가 설치된 Windows 환경이고 QueryPie와 k8s 클러스터는 VMware로 띄워 진행하였다.

하면서 특별히 진행하며 막혔던 부분을 Trouble Shooting으로 남겨놓는다.

 

 

흐름 요약
[User]
  ↓ Okta SAML
[QueryPie]
  ↓ (KAC Policy)
[Kubernetes API Server]
  ↓
[k8s-master:6443]

 

 

Trouble Shooting1

모든 설정을 마친 후 agent의 설명에 따라 kubeconfig를 받았왔지만

customer.kac-proxy.domain 이라는 낯선 도메인의 host를 resolve 못 하여 kube apiserver에 접근을 못 하였다.

 

흐름 요약에 있는 다이어그램을 고려하면

customer.kac-proxy.domain 라는 도메인은 결국 QueryPie가 설치되어 있는 서버임을 알 수 있다.

실제로 해당 서버의 6443 포트를 사용하는 프로세스가 proxy로 사용되는 것을 확인할 수 있었다.

 

C:\Windows\System32\drivers\etc\hosts

User에 해당하는 서버에서 host 명을 resolve 할 수 있도록 hosts 파일에 아래와 같이 정보를 기입하였다.

 

 

Trouble Shooting2

첫번째 이슈가 해결되자 이번에는 Okta의 유저에 대한 권한이 부족하여 pod 정보를 받지 못했다.

 

 

[root@k8s-master ~]# k describe clusterrolebindings.rbac.authorization.k8s.io querypie-crb
Name:         querypie-crb
Labels:       <none>
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  querypie-role
Subjects:
  Kind            Name         Namespace
  ----            ----         ---------
  ServiceAccount  querypie-sa  querypie
[root@k8s-master ~]# k describe clusterrole querypie-role
Name:         querypie-role
Labels:       <none>
Annotations:  <none>
PolicyRule:
  Resources        Non-Resource URLs  Resource Names  Verbs
  ---------        -----------------  --------------  -----
  groups           []                 []              [impersonate]
  serviceaccounts  []                 []              [impersonate]
  users            []                 []              [impersonate]

manual에서 생성했던 querypie-sa에 부여된 clusterrole을 확인하면 impersonate로 동작함을 알 수 있다.

따라서 Okta 유저에 대한 권한이 따로 필요한 듯 하다.

 

[root@k8s-master ~]# k describe clusterrolebindings.rbac.authorization.k8s.io qp-user-k8s-admin-cluster-admin
Name:         qp-user-k8s-admin-cluster-admin
Labels:       <none>
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  cluster-admin
Subjects:
  Kind  Name       Namespace
  ----  ----       ---------
  User  K8s Admin

이렇게 권한을 부여 후에는 아래 사진과 같이 kubectl 명령어를 자유롭게 사용할 수 있었다.

 

 

KAC

여기서 KAC의 유효성에 대해 확인하고자 한다.

k8s admin 유저는 아래와 같이 KAC policy를 적용했기 때문에 모든 조회가 가능했다.

 

하지만 k8s readonly 유저 같은 경우 같은 clusterrole을 binding 했음에도

[root@k8s-master ~]# k describe clusterrolebindings.rbac.authorization.k8s.io qp-user-k8s-cluster
Name:         qp-user-k8s-cluster
Labels:       <none>
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  cluster-admin
Subjects:
  Kind  Name          Namespace
  ----  ----          ---------
  User  K8s Readonly

 

아래와 같은 KAC Policy를 사용했기 때문에

default 네임 스페이스에서 blue-*에 해당하는 파드 정보만 조회할 수 있었다.

결과적으로 KAC는 k8s에 도달하기 전 요청한 내용을 걸러 내는 것을 알 수 있었다.

'Okta+QueryPie+k8s' 카테고리의 다른 글

Okta + SAML → QueryPie 로그인  (0) 2026.01.06
QueryPie ACP Community Edition 구축  (0) 2026.01.05
QueryPie 구축(K8s)  (0) 2025.12.31
Okta OIDC Application 생성  (0) 2025.12.30
Okta User 생성 + Group 맵핑 자동화  (0) 2025.12.29
참고 문서

https://docs.querypie.com/ko/administrator-manual/general/user-management/authentication/integrating-with-okta

 

Okta 연동하기 - QueryPie ACP

QueryPie ACP

docs.querypie.com

약간의 인터페이스 차이가 있었으나, 위 문서를 참고하여 연동하니 성공하였다.

Okta 계정으로 QueryPie에 로그인을 진행하며 발생했던 Trouble Shooting을 아래와 같이 정리하였다.

 

 

Trouble Shooting1

 

가이드대로 Okta에서는 destination을 잘 설정하였으나,

QueryPie에서 응답하지 못해 아래 캡처 사진과 같이 Web Base URL을 설정하여 해결하였다.

 

 

Trouble Shooting2

 

QueryPie가 설치된 VM에서의 시간이 현재 시간보다 늦어 발생한 문제였다.

아래와 같이 시간을 동기화하여 해결되었다.

[root@querypie ~]# chronyc makestep
200 OK
[root@querypie ~]# date
Wed Jan  7 05:47:21 PM KST 2026
[root@querypie ~]# cd querypie/
[root@querypie querypie]# cd current/
[root@querypie current]# docker compose restart

 

 

Trouble Shooting3

 

이번에는 Synchronize 이후 Okta에서 생성한 계정이 QueryPie로 동기화되지만,

QueryPie 상에서 계정이 비활성화 상태여서 발생한 에러다.

아래와 같이 계정을 활성화시켜 이슈를 해결하였다.

 

최종적으로 아래와 같이 로그인에 성공한 것을 확인할 수 있다!

 

 

흐름 요약
[사용자]
   ↓
[QueryPie 로그인 버튼]
   ↓ (SAML AuthnRequest)
[Okta]
   ↓ (인증 성공)
[SAML Response]
   ↓
[QueryPie 로그인 완료]

'Okta+QueryPie+k8s' 카테고리의 다른 글

k8s를 QueryPie에 연동  (0) 2026.01.12
QueryPie ACP Community Edition 구축  (0) 2026.01.05
QueryPie 구축(K8s)  (0) 2025.12.31
Okta OIDC Application 생성  (0) 2025.12.30
Okta User 생성 + Group 맵핑 자동화  (0) 2025.12.29
참고 문서

https://www.querypie.com/features/documentation/querypie-install-guide

 

QueryPie ACP Community Edition Installation Guide

QueryPie ACP Community Edition is a free version that lets you experience all the core features of QueryPie ACP Enterprise — including Database, System, Kubernetes, and Web Access Controllers — with a maximum limit of 5 users. Get started quickly with

www.querypie.com

 

 

설치
bash <(curl https://dl.querypie.com/setup.v2.sh)

 

설치가 완료되면 아래와 같이 접속 가능 URL 확인이 가능하고 container가 생성되어 있다.

## Skip enabling systemd service for rootless Podman since Docker is used.
### Installation completed successfully
### Access QueryPie at http://10.0.2.17:8000 or https://10.0.2.17:8443 in your browser
### Determine the public IP address of your host machine if needed

[root@k8s-node02 ~]# docker ps
CONTAINER ID   IMAGE                      COMMAND                  CREATED         STATUS         PORTS                                                                                                                                                                                                                                                                                                NAMES
4a874571b504   querypie/querypie:11.5.0   "/usr/local/bin/dock…"   4 minutes ago   Up 4 minutes   0.0.0.0:6443->6443/tcp, [::]:6443->6443/tcp, 0.0.0.0:7447->7447/tcp, [::]:7447->7447/tcp, 0.0.0.0:9000->9000/tcp, [::]:9000->9000/tcp, 0.0.0.0:40000-40030->40000-40030/tcp, [::]:40000-40030->40000-40030/tcp, 0.0.0.0:8000->80/tcp, [::]:8000->80/tcp, 0.0.0.0:8443->443/tcp, [::]:8443->443/tcp   querypie-app-1
38dc5652e610   querypie/redis:7.4.5       "docker-entrypoint.s…"   6 minutes ago   Up 6 minutes   0.0.0.0:6379->6379/tcp, [::]:6379->6379/tcp                                                                                                                                                                                                                                                          querypie-redis-1
e83acd0f996e   querypie/mysql:8.0.42      "docker-entrypoint.s…"   6 minutes ago   Up 6 minutes   0.0.0.0:3306->3306/tcp, [::]:3306->3306/tcp, 33060/tcp                                                                                                                                                                                                                                               querypie-mysql-1

 

 

라이센스 신청

https://www.querypie.com/querypie/license/community/apply

 

QueryPie License Request

QueryPie AI is here to help you achieve successful AI transformation in your life and business. Delivering affordable enterprise AI, integrating with your existing infrastructure, and supporting your agent-building journey—from self-service to expert par

www.querypie.com

간단한 POC이기 때문에  Free로 신청

 

 

인증서 등록

 

 

접속

초기 ID/PW

ID: qp-admin
PW: querypie

 

 

관리자를 위한 메뉴얼

https://docs.querypie.com/en/administrator-manual

 

Administrator Manual - QueryPie ACP

QueryPie ACP

docs.querypie.com

'Okta+QueryPie+k8s' 카테고리의 다른 글

k8s를 QueryPie에 연동  (0) 2026.01.12
Okta + SAML → QueryPie 로그인  (0) 2026.01.06
QueryPie 구축(K8s)  (0) 2025.12.31
Okta OIDC Application 생성  (0) 2025.12.30
Okta User 생성 + Group 맵핑 자동화  (0) 2025.12.29
참고문서

https://github.com/chequer-io/querypie-deployment

 

GitHub - chequer-io/querypie-deployment

Contribute to chequer-io/querypie-deployment development by creating an account on GitHub.

github.com

https://docs.querypie.com/ko/installation/installation

 

설치하기 - QueryPie ACP

QueryPie ACP

docs.querypie.com

 

 

QueryPie 최소구성 아키텍처
[Browser]
   ↓
[QueryPie Web]
   ↓ (OIDC Redirect)
[Okta]
   ↓ (ID Token)
[QueryPie]

 

 

인프라 권장사항
권장 노드 사양: r5.xlarge (4 vCPU, 32GB RAM)
Kubernetes 버전: 1.24 이상
필요 노드 수: 최소 1개 (프로덕션 환경은 3개 이상 권장)

 

 

namespace 생성
kubectl create namespace querypie

 

 

MetaDB 설치

MySQL은 QueryPie의 메타데이터를 저장하는 데이터베이스로 사용된다.

 

# PV 생성

apiVersion: v1
kind: PersistentVolume
metadata:
  name: local-pv
  labels:
    app: mysql     
spec:
  capacity:
    storage: 50Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /var/lib/mysql
    type: DirectoryOrCreate
[root@k8s-master terraform-access-control]# vi pv.yaml
[root@k8s-master terraform-access-control]# k apply -f pv.yaml
persistentvolume/local-pv created
[root@k8s-master terraform-access-control]# k get pv
NAME                    CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM                            STORAGECLASS   VOLUMEATTRIBUTESCLASS   REASON   AGE
local-pv                50Gi       RWO            Retain           Available                                                   <unset>                          2s

 

 

MySQL statefulset 배포
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: mysql
  namespace: querypie
spec:
  selector:
    matchLabels:
      app: mysql
  serviceName: mysql
  replicas: 1
  template:
    metadata:
      labels:
        app: mysql
    spec:
      containers:
        - name: mysql
          image: mysql:8.0
          env:
            - name: MYSQL_ROOT_PASSWORD
              value: querypie
            - name: MYSQL_DATABASE
              value: querypie
            - name: MYSQL_USER
              value: querypie
            - name: MYSQL_PASSWORD
              value: querypie
          resources:
            requests:
              cpu: "0.5"
              memory: "2Gi"
          ports:
            - containerPort: 3306
              name: mysql
          volumeMounts:
            - name: data
              mountPath: /var/lib/mysql
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes: [ "ReadWriteOnce" ]
        resources:
          requests:
            storage: 50Gi
        storageClassName: ""              
        selector:                       
          matchLabels:
            app: mysql
---
apiVersion: v1
kind: Service
metadata:
  name: mysql
  namespace: querypie
  labels:
    app: mysql
spec:
  type: ClusterIP
  selector:
    app: mysql
  ports:
    - port: 3306
      targetPort: 3306
      protocol: TCP
      name: mysql
[root@k8s-master terraform-access-control]# vi mysql.yaml
[root@k8s-master terraform-access-control]# k apply -f mysql.yaml
statefulset.apps/mysql created
service/mysql created
[root@k8s-master terraform-access-control]# k get svc
NAME    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
mysql   ClusterIP   10.98.161.155   <none>        3306/TCP   72s
[root@k8s-master terraform-access-control]# k get po
NAME      READY   STATUS    RESTARTS   AGE
mysql-0   1/1     Running   0          74s

 

 

데이터베이스 초기화
kubectl exec -it mysql-0 -n querypie -- mysql -u root -p
# 비밀번호: querypie
DROP DATABASE IF EXISTS querypie;
DROP DATABASE IF EXISTS querypie_log;
DROP DATABASE IF EXISTS querypie_snapshot;
 
CREATE database querypie CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE database querypie_log CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE database querypie_snapshot CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
 
GRANT ALL privileges ON querypie.* TO querypie@'%';
GRANT ALL privileges ON querypie_log.* TO querypie@'%';
GRANT ALL privileges ON querypie_snapshot.* TO querypie@'%';
 
FLUSH PRIVILEGES;
exit

 

 

Redis 설치

Redis는 QueryPie의 세션 및 캐시 저장소로 사용된다.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis
  namespace: querypie
  labels:
    app: redis
spec:
  selector:
    matchLabels:
      app: redis
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
        - name: redis
          image: redis:7
          imagePullPolicy: IfNotPresent
          args: ["--requirepass", "querypie"]
          ports:
            - containerPort: 6379
              protocol: TCP
          resources:
            limits:
              cpu: "0.1"
              memory: "1Gi"
          volumeMounts:
            - name: redis-data
              mountPath: /data
      restartPolicy: Always
      volumes:
        - name: redis-data
          emptyDir: {}   # 파드 재시작 시 데이터 삭제 (캐시 용도면 OK)
---
apiVersion: v1
kind: Service
metadata:
  name: redis
  namespace: querypie
  labels:
    app: redis
spec:
  type: ClusterIP
  selector:
    app: redis
  ports:
    - port: 6379
      targetPort: 6379
      protocol: TCP
[root@k8s-master terraform-access-control]# vi redis.yaml
[root@k8s-master terraform-access-control]# k apply -f redis.yaml
deployment.apps/redis created
service/redis created
[root@k8s-master terraform-access-control]# k get svc
NAME    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
mysql   ClusterIP   10.98.161.155    <none>        3306/TCP   19m
redis   ClusterIP   10.108.214.141   <none>        6379/TCP   50s
[root@k8s-master terraform-access-control]# k get po -o wide
NAME                     READY   STATUS    RESTARTS   AGE   IP           NODE         NOMINATED NODE   READINESS GATES
mysql-0                  1/1     Running   0          19m   10.85.2.94   k8s-node02   <none>           <none>
redis-69b5bb5694-bzvb2   1/1     Running   0          54s   10.85.2.95   k8s-node02   <none>           <none>

 

 

QueryPie 설치
harbor.chequer.io

주소는 QueryPie image를 pull 할 수 있는 사설 레지스트리 주소다.

최초 설치 시 고객사 Harbor 계정을 생성하여 사전에 전달하여 설치할 수 있다.

따라서 kubernetes에 실제적인 설치는 못했지만, 설치 메뉴얼을 남긴다.

 

# Harbor 레지스트리 인증 정보 등록

kubectl create secret docker-registry querypie-regcred \
  --docker-server=harbor.chequer.io \
  --docker-username='{harbor-id}' \
  --docker-password='{harbor-pw}' \
  -n querypie

 

# QueryPie 환경 설정(querypie.env로 저장)

# Agent Secret (32자리 임의의 문자열)
AGENT_SECRET=01234567890123456789012345678912
KEK=querypie
 
# QueryPie Meta DB 접속 정보
DB_CATALOG=querypie
DB_HOST=mysql
DB_USERNAME=querypie
DB_PASSWORD=querypie
DB_PORT=3306
 
# QueryPie Log DB 접속 정보
LOG_DB_CATALOG=querypie_log
LOG_DB_HOST=mysql
LOG_DB_USERNAME=querypie
LOG_DB_PASSWORD=querypie
LOG_DB_PORT=3306
 
# QueryPie Snapshot DB 접속 정보
ENG_DB_CATALOG=querypie_snapshot
ENG_DB_HOST=mysql
ENG_DB_USERNAME=querypie
ENG_DB_PASSWORD=querypie
ENG_DB_PORT=3306
 
# Redis 접속 정보
REDIS_NODES=redis:6379
REDIS_PASSWORD=querypie

 

# 환경설정 파일을 secret로 등록

kubectl create secret generic querypie-secret --from-env-file=querypie.env -n querypie

 

# Helm Chart 설정

[root@k8s-master terraform-access-control]# helm repo add querypie https://chequer-io.github.io/querypie-deployment/helm-chart
"querypie" has been added to your repositories
[root@k8s-master terraform-access-control]# helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "querypie" chart repository
[root@k8s-master terraform-access-control]# helm repo list
NAME            URL
querypie        https://chequer-io.github.io/querypie-deployment/helm-chart
[root@k8s-master terraform-access-control]# helm search repo querypie
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
querypie/querypie       1.4.4           11.5.0          A Helm chart for QueryPie

 

values.yaml 로 아래 파일 저장

appVersion: &version 11.3.0
 
global:
  image: 
    # -- Default registry used for all images
    registry: harbor.chequer.io
    # -- Default image tags used for all images
    tag: *version
    # -- Default image pull policy for all images
    pullPolicy: IfNotPresent
  # -- Default labels for all resources deployed by the chart
  labels: {}
 
# -- ServiceAccount for QueryPie and QueryPie tools pods
# It is created for authenticating private image registry and AWS API.
# @default -- {}
serviceAccount:
  labels: {}
  annotations: {}
  # -- The name of the secret used for pulling the QueryPie image from the private registry.
  # To create, run `kubectl create secret docker-registry querypie-regcred --docker-server=harbor.chequer.io --docker-username=admin --docker-password=your-password`
  imagePullSecrets:
    - name: querypie-regcred
 
querypie:
  # -- Labels used for QueryPie pods.
  labels: {}
  # -- Annotations used for QueryPie pods.
  annotations: {}
  tolerations: {}
  # -- NodeSelector for QueryPie pods
  nodeSelector: {}
  replicas: 1
  # -- PodManagementPolicy for QueryPie pods. OrderedReady is fine for most cases, but Parallel is also good for large-scale deployments.
  podManagementPolicy: Parallel
  image:
    # -- (string) Registry used for the QueryPie image. If not set, the global registry will be used.
    registry:
    # -- (string) Tag used for the QueryPie image. If not set, the global tag will be used.
    tag:
    # -- (string) PullPolicy used for the QueryPie image. If not set, the global pullPolicy will be used.
    pullPolicy:
    # -- Repository used for the QueryPie image. (required)
    repository: querypie/querypie
  ingress:
    # -- (bool) If true, Ingress resource for QueryPie will be created.
    enabled: true
    labels: {}
    # -- Annotations used for the Ingress resource.
    # It is useful when you want to enable controller-specific feature for the Ingress resource.
    annotations: {}
    # -- (string) Class used for the Ingress resource. If not set, the default class will be used.
    ingressClassName: ""
    # -- Hostname used for the Ingress resource. If not set, every hostname will be accepted.
    host: querypie.querypie.io #실제 설정된 url 입력
    # -- Extra paths used for the Ingress resource.
    # It is mostly used for redirecting HTTP to HTTPS if the ingress controller does not support redirect by default.
 
  proxyService:
    # -- Create a service resource for QueryPie Agent connections.
    # Basically, it opens 9000/tcp port for the QueryPie Agent, and 40000~/tcp for the Agentless connections.
    enabled: true
    labels: {}
    # -- Annotations used for the Service resource.
    # It is useful when you want to enable controller-specific feature for the Service resource.
    annotations: {}
    type: LoadBalancer
    loadBalancerClass: ""
    # -- Set the externalTrafficPolicy to Local is recommended for auditing the real client IP address.
    externalTrafficPolicy: "Local"
    # -- SessionAffinity is not required for the QueryPie.
    sessionAffinity: "None"
  updateStrategy:
    # -- The strategy used for updating the QueryPie pods.
    # It is generally recommended to use the RollingUpdate strategy.
    # But if required, you can change it to OnDelete for manual operations.
    type: RollingUpdate
  resources:
    requests:
      cpu: "2000m"
      memory: 16Gi
    limits:
      # -- More than 2 CPU cores are recommended.
      cpu: "2000m"
      # -- More than 16Gi memory is recommended.
      memory: 16Gi
  logrotator:
    image:
      # -- (string) Registry used for the Logrotate image. If not set, the global registry will be used.
      repository: querypie/logrotate
      # -- (string) Tag used for the Logrotate image. If not set, the global tag will be used.
      tag: latest
  # -- External storage for the QueryPie Object Storage.
  externalStorage:
    # -- Type of the external storage.
    # - none: No external storage.
    # - persistentVolumeClaim: using a single Persistent Volume Claim for all QueryPie pods.
    type: none
    # -- Use a persistent volume claim for the external storage. It will be available if the type is persistentVolumeClaim.
    persistentVolumeClaim:
      # -- Use an existing Persistent Volume Claim for the external storage.
      # If you set this to true, this helm chart will not create a new Persistent Volume Claim.
      useExisting: false
      # -- The name of the existing Persistent Volume Claim to be used.
      claimName: ""
      # -- Metadata of the Persistent Volume Claim.
      metadata:
        annotations: {}
        labels: {}
      # -- Spec of the Persistent Volume Claim.
      spec:
        storageClassName: ""
        resources:
          requests:
            storage: 100Gi
        # -- It is required to have ReadWriteMany access mode on production.
        accessModes:
          - ReadWriteMany
  # -- Extra environment variables used for the QueryPie pods.
  # This is useful for experimental features, debugging, workaround, and so on.
  # for example:
  # API_JVM_HEAPSIZE: '2g' will set the JVM heap size to 2GB.
  extraEnvs: {}
 
tools:
  image:
    # -- Registry used for the QueryPie tools image. If not set, the global registry will be used.
    repository: querypie/querypie-tools
 
config:
  # -- External URL that users use to access the QueryPie via web.
  # Specify the scheme, hostname, and port is required.
  externalURL: "https://querypie.querypie.io" #실제 설정된 url 입력
  secretName: "querypie-secret"
 
  database:
    querypie:
      # -- The maximum number of connections that QueryPie can use for "metastore" purposes.
      connectionPoolSize: 20
 
  dac:
    # -- This setting is used to ignore simple queries sent by client tools such as DataGrip.
    # Please refer to the commented-out example below.
    skipCommandConfigData: "{}"
    # skipCommandConfig: |
    #   {
    #     "mysql": [
    #       "^(/\\*.*?\\*/)?\\s*SELECT\\s+@@session\\s*\\.\\s*\\w+\\s*$",
    #       "^(/\\*.*?\\*/)?\\s*SET\\s+session\\s+transaction\\s+\\w+(\\s+\\w+)*\\s*$",
    #       "^(/\\*.*?\\*/)?\\s*SET\\s+net_write_timeout\\s*=\\s*\\d+\\s*$",
    #       "^(/\\*.*?\\*/)?\\s*SELECT\\s+database\\s*\\(\\s*\\)\\s*$",
    #       "^(/\\*.*?\\*/)?\\s*SET\\s+SQL_SELECT_LIMIT\\s*=\\s*\\w+$",
    #       "^SHOW\\s+VARIABLES\\s+LIKE\\s+'aurora\\\\_version'\\s*$",
    #       "^SELECT\\s+version\\s*\\(\\s*\\)\\s*,\\s*@@version_comment\\s*,\\s*database\\s*\\(\\s*\\)\\s*$",
    #       "^SET\\s+autocommit\\s*=\\s*\\d+$",
    #       "^(/\\*.*?\\*/)\\s*SELECT\\s+((@@session\\s*\\.\\s*|@@)\\w+(\\s+AS\\s+\\w+)?(\\s*,\\s*)?)+\\s*$"
    #     ]
    #   }
    # -- The path where the skip command config file will be mounted.
    skipCommandConfigFile: /app/arisa/skip_command_config.json

 

# QueryPie 설치

helm upgrade --install poc querypie/querypie --version 1.4.1 -n querypie -f values.yaml

 

# 데이터베이스 마이그레이션

kubectl exec -it deployments/poc-querypie-tools -n querypie -- /app/script/migrate.sh runall

 

# 라이선스 등록

kubectl port-forward -n querypie deploy/poc-querypie-tools 8050:8050 &
curl -X POST http://127.0.0.1:8050/license/upload -F file=@license.crt
[License] Upload: Success  # 결과
# port-forward 종료
jobs
kill %1

 

# README.md

## QueryPie Deployment (PoC)

- Helm 기반 QueryPie 배포 구성
- Okta OIDC 연동 설계 및 Terraform IaC 구현
- Private Harbor Registry ImagePullSecret 구성

### Known Limitation
- QueryPie container images are hosted in a private registry (harbor.chequer.io)
- Image pull requires vendor-provided credentials
- Without registry credentials, Pods remain in ErrImagePull state

'Okta+QueryPie+k8s' 카테고리의 다른 글

Okta + SAML → QueryPie 로그인  (0) 2026.01.06
QueryPie ACP Community Edition 구축  (0) 2026.01.05
Okta OIDC Application 생성  (0) 2025.12.30
Okta User 생성 + Group 맵핑 자동화  (0) 2025.12.29
Okta IAM 자동화  (1) 2025.12.29

+ Recent posts