๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ปTech160

k8s nginx-ingress disable hsts https๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ingress ์—์„œ ์•„๋ž˜ configuration-snippet ์„ค์ •์„ ์ถ”๊ฐ€apiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: http-ingress annotations: nginx.ingress.kubernetes.io/configuration-snippet: | more_clear_headers "Strict-Transport-Security"; 2024. 6. 21.
์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ฐœ๋… Kubernetes ConceptKubernetes์ปจํ…Œ์ด๋„ˆํ™”๋œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๋ฐฐํฌ, ํ™•์žฅ ๋ฐ ๊ด€๋ฆฌ๋ฅผ ์ž๋™ํ™”ํ•˜๊ธฐ ์œ„ํ•œ ์˜คํ”ˆ์†Œ์Šค ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜ ์‹œ์Šคํ…œ์‚ฌ์šฉ ์ด์œ ์„œ๋ฒ„ ์ž์›์„ ํšจ์œจ์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋ฉด ๋Œ€๊ทœ๋ชจ ์„œ๋น„์Šค๋ฅผ ์šด์˜ํ•˜๋Š” ๊ธฐ์—…๋“ค์€ ํฐ ๋น„์šฉ ์ ˆ๊ฐ ํšจ๊ณผ์—ฌ๋Ÿฌ ์„œ๋น„์Šค์—์„œ ์„œ๋ฒ„ ์ž์›์„ ๊ณต์œ ํ•ด์„œ ์‚ฌ์šฉ ๊ฐ€๋Šฅ VM vs ContainerVM ๊ฐ€์ƒํ™”๋Š” ๋ณ„๋„์˜ Guest OS๋ฅผ ๊ฐ€์ง€๊ณ  ์‹คํ–‰ํ•จ์ปจํ…Œ์ด๋„ˆ๋Š” Host OS์˜ ์ปค๋„์„ ๊ณต์œ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ€๋ณ๊ณ  VM๋ณด๋‹ค ๋” ๋†’์€ ์„ฑ๋Šฅ์„ ์ œ๊ณต Container Runtime์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋˜๋Š” ์†Œํ”„ํŠธ์›จ์–ด (Docker, containerd, CRI-O)k8s์—์„œ๋Š” v1.23๊นŒ์ง€๋งŒ Docker๋ฅผ ์ง€์›ํ•˜๊ณ  ๊ทธ ์ดํ›„ ๋ฒ„์ „์—์„œ deprecated, ๋„์ปค๋ณด๋‹ค ๊ฐ„๊ฒฐํ•œ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๊ฐ–์€ cont.. 2024. 4. 7.
zeppelin notebook execute REST API โ—พ curl ๋ช…๋ น์–ด๋กœ zeppelin ๋…ธํŠธ๋ถ ์‹คํ–‰ ๋ฐฉ๋ฒ• #!/bin/bash kinit -kt /opt/cloudera/security/user.keytab userid curl -X POST -H "accept: application/json" --negotiate -u : \ https://zeppelin-server-url:8886/api/notebook/run/$1/$2 $1 : paragraph $2 : notebook index name ํ™•์ธ : zeppelin > notebook > wheel icon 2023. 11. 22.
[๋ฆฌ๋ˆ…์Šค] resolv.conf ์›๋ณต ํ˜„์ƒ ์กฐ์น˜๋ฐฉ๋ฒ• ์„œ๋ฒ„๊ฐ€ ์žฌ๊ธฐ๋™ ๋˜๋ฉด์„œ /etc/resolv.conf ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ ๋‚ด์šฉ์ด ์›๋ณต๋˜๋Š” ํ˜„์ƒ์— ๋Œ€ํ•œ ์กฐ์น˜ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ ๋‚ด์šฉ์ด ์„œ๋ฒ„ ์žฌ๊ธฐ๋™ ํ›„์— ์›๋ณต๋˜๋Š” ํ˜„์ƒ์€ ์ฃผ๋กœ ๋„คํŠธ์›Œํฌ ๊ด€๋ฆฌ ๋„๊ตฌ๋‚˜ ์„œ๋น„์Šค์— ์˜ํ•ด ํŒŒ์ผ์ด ์ž๋™์œผ๋กœ ๊ด€๋ฆฌ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. โ—พ /etc/resolv.conf ์ˆ˜์ •, ์‚ญ์ œ ์ œํ•œ ์ง์ ‘ ํŽธ์ง‘ํ•˜์ง€ ๋ชปํ•˜๋„๋ก chattr +i ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์„ ์ž ๊ธˆ ## ์ž ๊ธˆ chattr +i /etc/resolv.conf ## ์ž ๊ธˆ ํ•ด์ œ chattr -i /etc/resolv.conf 2023. 11. 21.
[๋ฆฌ๋ˆ…์Šค] LVM ์„ค์ • ๋ฐฉ๋ฒ• ๋ฆฌ๋ˆ…์Šค์˜ LVM(Logical Volume Manager)์€ ์Šคํ† ๋ฆฌ์ง€ ๊ด€๋ฆฌ์˜ ์œ ์—ฐํ•œ ๋ฐฉ๋ฒ•์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. LVM์„ ์‚ฌ์šฉํ•˜๋ฉด ์—ฌ๋Ÿฌ ๋””์Šคํฌ๋ฅผ ํ•˜๋‚˜์˜ ํฐ ๋””์Šคํฌ์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜, ํ•„์š”์— ๋”ฐ๋ผ ์Šคํ† ๋ฆฌ์ง€ ํฌ๊ธฐ๋ฅผ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.LVM ์ฃผ์š” ๊ตฌ์„ฑ ์š”์†ŒPV (Physical Volume): ์‹ค์ œ ๋””์Šคํฌ ํŒŒํ‹ฐ์…˜์œผ๋กœ, LVM์—์„œ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ํ•˜๋“œ ๋“œ๋ผ์ด๋ธŒ์˜ ํŒŒํ‹ฐ์…˜์ด๋‚˜ ์ „์ฒด ๋“œ๋ผ์ด๋ธŒ๊ฐ€ ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.VG (Volume Group): ํ•˜๋‚˜ ์ด์ƒ์˜ PV๋ฅผ ๊ฒฐํ•ฉํ•˜์—ฌ ์ƒ์„ฑ๋œ ์ €์žฅ์†Œ์˜ ๋…ผ๋ฆฌ์  ๊ทธ๋ฃน์ž…๋‹ˆ๋‹ค. VG๋Š” ํ•˜๋‚˜ ์ด์ƒ์˜ LV๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.LV (Logical Volume): VG ๋‚ด์—์„œ ์ƒ์„ฑ๋˜๋Š” ๋…ผ๋ฆฌ์  ๋‹จ์œ„๋กœ, ์‹ค์ œ ํŒŒ์ผ ์‹œ์Šคํ…œ์ด ์ƒ์„ฑ๋˜๋Š” ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. LV๋Š” ํ•„์š”์— ๋”ฐ๋ผ ํฌ๊ธฐ๋ฅผ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.PE .. 2023. 11. 20.
CS ์ •๋ฆฌ ๋น…๋ฐ์ดํ„ฐ ๋น…๋ฐ์ดํ„ฐ ๊ธฐ์กด DB ๊ด€๋ฆฌ๋„๊ตฌ์˜ ์ˆ˜์ง‘,์ €์žฅ,๊ด€๋ฆฌ,๋ถ„์„ ์—ญ๋Ÿ‰์„ ๋„˜์–ด์„œ๋Š” ๋ฐ์ดํ„ฐ ํŠน์ง• - 3V (ํฌ๊ธฐ,๋‹ค์–‘์„ฑ,์†๋„) , 5V(๊ฐ€์น˜,์ •ํ™•์„ฑ) ์ •ํ˜• - ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค,CSV,์—‘์…€ ๋ฐ˜์ •ํ˜• - XML,HTML,JSON ๋น„์ •ํ˜• - ๋™์˜์ƒ,์‚ฌ์ง„,์˜ค๋””์˜ค ๋น…๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ๋‹จ๊ณ„ ์ˆ˜์ง‘ > ์ •์ œ > ์ ์žฌ > ๋ถ„์„ > ์‹œ๊ฐํ™” Hadoop ๋“ฑ์žฅ ๋ฐฐ๊ฒฝ ๋ฐ ํ•„์š”์„ฑ ์›น ๋กœ๊ทธ๋“ฑ์˜ ๋น„์ •ํ˜• ๋ฐ์ดํ„ฐ๋ฅผ RDBMS์— ์ €์žฅํ•˜๊ธฐ์—๋Š” ๋ฐ์ดํ„ฐ์˜ ํฌ๊ธฐ๊ฐ€ ๋„ˆ๋ฌด ํฌ๊ณ  ๋น„์šฉ๋„ ๋ถ€๋‹ด์ด์—ˆ๋‹ค. ํ•˜๋‘ก์€ x86 ๋ฆฌ๋ˆ…์Šค ์„œ๋ฒ„๋ผ๋ฉด ์–ด๋–ค ์ˆ˜์ค€์˜ ์žฅ๋น„๋“  ์ƒ๊ด€ ์—†๊ณ  ๋ฐ์ดํ„ฐ ์šฉ๋Ÿ‰์ด ์ปค์ง€๋ฉด ๋…ธ๋“œ ํ™•์žฅ(scale-out)์ด ๊ฐ€๋Šฅ, ๋ถ„์‚ฐ ์ €์žฅ ๋ฐ ์ฒ˜๋ฆฌ๋กœ ์„ฑ๋Šฅ๋„ ํ–ฅ์ƒ Avro Avro๋Š” JSON ํ˜•์‹์œผ๋กœ ์Šคํ‚ค๋งˆ๋ฅผ ์ •์˜ํ•˜๊ณ , ๋ฐ์ดํ„ฐ๋Š” ๋ฐ”์ด๋„ˆ๋ฆฌ ํ˜•ํƒœ๋กœ ์ง๋ ฌํ™”๋ฉ๋‹ˆ๋‹ค. ์Šคํ‚ค๋งˆ๊ฐ€ ๋ฐ์ดํ„ฐ์™€ ํ•จ๊ป˜.. 2023. 10. 13.
[Impala] resource pool ์ƒ์„ฑ ๋ฐ ์ ์šฉ ๋ฐฉ๋ฒ• Impala์—์„œ ๊ทธ๋ฃน๋ช…์„ ๊ธฐ์ค€์œผ๋กœ resource pool์„ ์ƒ์„ฑํ•˜์—ฌ, ๊ฐ ๊ทธ๋ฃน๋ณ„ ๋ฆฌ์†Œ์Šค๋ฅผ ๋ถ„ํ• ํ•œ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. 1. Impala Admission Control Configuration ์ ‘์† CM > Cluster Menu > Impala Admission Control Configuration 2. ๊ทธ๋ฃน๋ช… ๊ธฐ์ค€์œผ๋กœ pool ์ƒ์„ฑ Impala Admission Control Configuration > Create Resource Pool ๋ฒ„ํŠผ ํด๋ฆญ Max memory ์„ค์ •ํ•˜์—ฌ ๊ทธ๋ฃน๋ณ„ ๋ฆฌ์†Œ์Šค ์ œํ•œ clone ๊ธฐ๋Šฅ ์‚ฌ์šฉํ•˜๋ฉด ๊ธฐ์กด default pool์— ์ ์šฉํ•œ ์˜ต์…˜ ๋ชจ๋‘ ๋ณต์‚ฌ ๊ฐ€๋Šฅ 3. placement rule ์ถ”๊ฐ€ Impala Admission Control Configuration > Placemen.. 2023. 10. 5.
[Java] ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค ๋‹จ์–ด ๋ณ€ํ™˜ ๐Ÿ“„ ๋ฌธ์ œ ๋‹จ์–ด ๋ณ€ํ™˜ ๐Ÿ’ก ํ’€์ด BFS(๋„ˆ๋น„ ์šฐ์„  ํƒ์ƒ‰) ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ์‚ฌ์šฉํ•˜์—ฌ "begin" ๋ฌธ์ž์—ด์—์„œ "target" ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜ํ•˜๋Š”๋ฐ ํ•„์š”ํ•œ ์ตœ์†Œ ๋‹จ๊ณ„ ์ˆ˜๋ฅผ ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค. import java.util.*; class Solution { public int solution(String begin, String target, String[] words) { int answer = 0; // ์ตœ์†Œ ๋‹จ๊ณ„ ์ˆ˜๋ฅผ ์ €์žฅํ•  ๋ณ€์ˆ˜ boolean[] visited = new boolean[words.length]; // ๋‹จ์–ด ๋ฐฉ๋ฌธ ์—ฌ๋ถ€๋ฅผ ์ถ”์ ํ•˜๋Š” ๋ฐฐ์—ด Queue queue = new LinkedList(); // BFS ํƒ์ƒ‰์„ ์œ„ํ•œ ํ queue.offer(begin); // ์‹œ์ž‘ ๋‹จ์–ด๋ฅผ ํ์— ์ถ”๊ฐ€ while (!queu.. 2023. 10. 4.