๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
DevOps/Kubernetes

[Rancher] Rancherd ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค HA ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์„ฑ ๋ฐ ์„ค์น˜, ํ์‡„๋ง ๋Œ€์ฒ˜ ๋ฐฉ๋ฒ•

by ๐ŸŒปโ™š 2021. 3. 11.

Rancher๋ž€?

Rancher๋Š” ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋ฐฐํฌํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋˜๋Š” ํˆด์ž…๋‹ˆ๋‹ค. web๊ธฐ๋ฐ˜ GUI์™€ command line ์ธํ„ฐํŽ˜์ด์Šค๋กœ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ๊ณ  ํ™•์žฅ ๋˜ํ•œ ์‰ฝ๊ฒŒ ๊ฐ€๋Šฅํ•˜๋‹ค. ์ด๋ฏธ ์กด์žฌํ•˜๋Š” ํด๋Ÿฌ์Šคํ„ฐ๋„ importํ•˜์—ฌ rancher ์ธํ„ฐํŽ˜์ด์Šค๋กœ ๊ด€๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ณ  ๋˜ํ•œ ์ œ๊ณต๋˜๋Š” ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์—์„œ ํ•„์š”ํ•œ application๋“ค์„ ์‰ฝ๊ฒŒ ๋ฐฐํฌํ•  ์ˆ˜๋„ ์žˆ๋‹ค. kubernetes๋ฅผ ์›น๊ธฐ๋ฐ˜์œผ๋กœ ์‰ฝ๊ฒŒ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค๋Š”๊ฒŒ ๊ฐ€์žฅ ํฐ ์žฅ์ ์ด๋‹ค.

 

Rancher ์„ค์น˜

์‚ฌ์ „ ์š”๊ตฌ ์‚ฌํ•ญ

์ŠคํŽ™

HA ๊ตฌ์„ฑ์„ ์œ„ํ•ด 3๊ฐœ ๋…ธ๋“œ ์ค€๋น„ --> ๋ฆฌ์†Œ์Šค ๋ถ€์กฑ์œผ๋กœ 2๊ฐœ master์™€ 1๊ฐœ worker ๋…ธ๋“œ๋กœ ๊ตฌ์„ฑํ•œ๋‹ค.
  - master01.centos.test (Memory 4G)
  - master02.centos.test (Memory 4G)
  - worker01.centos.test (Memory 2G)
๋…ธ๋“œ๋ณ„ ํ˜ธ์ŠคํŠธ ์ด๋ฆ„์œผ๋กœ ์ธ์‹ํ•  ์ˆ˜ ์žˆ๋„๋ก /etc/hosts์— ๊ฐ๊ฐ ์ถ”๊ฐ€ํ•ด์ค€๋‹ค

root๊ณ„์ •์œผ๋กœ ์ง„ํ–‰ํ•œ๋‹ค.

 

๋ฐฉํ™”๋ฒฝ ํ•ด์ œ

rancher.com/docs/rancher/v2.x/en/installation/requirements/ports/

 

Port Requirements

Read about port requirements needed in order for Rancher to operate properly, both for Rancher nodes and downstream Kubernetes cluster nodes

rancher.com

rancher์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํฌํŠธ์— ๋Œ€ํ•œ ์ •๋ณด์ž…๋‹ˆ๋‹ค.

 

๊ฐ„ํŽธํ•œ ์‹ค์Šต ์ง„ํ–‰์„ ์œ„ํ•ด ๋ฐฉํ™”๋ฒฝ์€ ํ•ด์ œํ•˜๊ณ  ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$ systemctl stop firewalld
$ systemctl disable firewalld

 

docker ์„ค์น˜

$ yum install -y docker
$ systemctl start docker

 

ntp ์„ค์ •

$ yum install -y ntp
$ systemctl start ntpd
$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*send.mx.cdnetwo 125.185.190.74   2 u    8   64    1    2.359   -0.734   0.454
 106.247.248.106 141.223.182.106  2 u    7   64    1    6.034    0.685   0.157
 dadns.cdnetwork 216.239.35.12    2 u    6   64    1    1.917    0.856   0.487

 

rancherd๋กœ rancher ์„ค์น˜ ๋ฐ ์ฒซ ๋ฒˆ์งธ server node ๋ฐฐํฌ

์ฒซ๋ฒˆ์งธ๋กœ ๋ฐฐํฌ๋˜๋Š” ์„œ๋ฒ„์— rancher-server๋ฅผ ์„ค์น˜ํ•˜๋ฉด์„œ Fixed Registration Address๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. Fixed Registration Address๋Š” rancher์—์„œ ๊ด€๋ฆฌ๋˜๋Š” ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๋…ธ๋“œ๋“ค์˜ endpoint๋กœ ์‚ฌ์šฉ๋˜๋ฉฐ ์•„๋ž˜ ๋‘๊ฐ€์ง€ ๋ชฉ์ ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

  • Kubernetes API ์ ‘๊ทผ
  • Kubernetes cluster์— ๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ

ํ•ด๋‹น ์„œ๋ฒ„์— rancher๊ด€๋ จ Web UI๋ฅผ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๊ณ  rancher-server๊ฐ€ ์‹คํ–‰๋ ๋•Œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์˜ ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๊ตฌ์„ฑํ•˜๊ณ  ๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฒŒ๋ฉ๋‹ˆ๋‹ค.

 

rancher config ์„ค์ •

/etc/rancher/rke2/config.yaml

token: secret
tls-san:
  - master01.centos.test
  • token : ๋‹ค๋ฅธ ๋…ธ๋“œ์—์„œ ํ†ต์‹ ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋˜๋Š” token๋ช…์ด๋‹ค.
  • tls-san : ์„œ๋ฒ„ tls cert์— ์ถ”๊ฐ€๋œ๋‹ค.

 

rancherd ์„ค์น˜

$ curl -sfL https://get.rancher.io | sh -
[INFO]  finding release for channel latest
[INFO]  using v2.5.6 as release
[INFO]  downloading checksums at https://github.com/rancher/rancher/releases/download/v2.5.6/sha256sum.txt
[INFO]  downloading tarball at https://github.com/rancher/rancher/releases/download/v2.5.6/rancherd-amd64.tar.gz
[INFO]  verifying installer
[INFO]  unpacking tarball file

๊ฐ€์žฅ ์ตœ์‹ ๋ฒ„์ „์œผ๋กœ rancherd installer๋ฅผ ์„ค์น˜ํ•œ๋‹ค.

"INSTALL_RANCHERD_VERSION=<version> sh -" ํ˜•ํƒœ๋กœ ๋’ค ๋ช…๋ น์–ด๋ฅผ ์ˆ˜์ •ํ•˜๋ฉด ์›ํ•˜๋Š” ๋ฒ„์ „์œผ๋กœ ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค. ๋ฒ„์ „์— ๋Œ€ํ•œ ์ •๋ณด๋Š” rancher git์—์„œ ํ™•์ธ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

github.com/rancher/rancher

 

rancher/rancher

Complete container management platform. Contribute to rancher/rancher development by creating an account on GitHub.

github.com

์ •์ƒ์ ์œผ๋กœ ์„ค์น˜๊ฐ€ ๋˜์—ˆ๋‹ค๋ฉด rancherd ๋ช…๋ น์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

$ rancherd --help
NAME:
   rancherd - Rancher Kubernetes Engine 2

USAGE:
   rancherd [global options] command [command options] [arguments...]

VERSION:
   v2.5.6 (HEAD)

COMMANDS:
   server       Run management server
   agent        Run node agent
   reset-admin  Bootstrap and reset admin password
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug        Turn on debug logs [$RKE2_DEBUG]
   --help, -h     show help
   --version, -v  print the version

 

rancherd-server ์„œ๋น„์Šค ์‹คํ–‰

$ systemctl start rancherd-server

# ํ•ด๋‹น ๋ช…๋ น์œผ๋กœ ์„œ๋น„์Šค๊ฐ€ ์‹คํ–‰ํ•˜๋ฉด์„œ ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์ถ•์— ๋Œ€ํ•œ ๋กœ๊ทธ๋ฅผ ํŒ”๋กœ์—…ํ•  ์ˆ˜ ์žˆ๋‹ค.
$ journalctl -eu rancherd-server -f
...
...
3์›” 11 06:05:24 master01.centos.test rancherd[8961]: time="2021-03-11T06:05:24-05:00" level=info msg="Handling backend connection request [master01.centos.test]"

์„œ๋น„์Šค๊ฐ€ ์˜ฌ๋ผ์˜ค๊ณ  ์ •์ƒ์ ์œผ๋กœ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๊ฐ€ ์‹คํ–‰๋ ๋•Œ๊นŒ์ง€ ์‹œ๊ฐ„์ด ๋‹ค์†Œ ์†Œ์š”๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

 

kubernetes cluster ํ™•์ธ

$ export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin

$ kubectl get nodes
NAME                   STATUS   ROLES         AGE    VERSION
master01.centos.test   Ready    etcd,master   112s   v1.18.16+rke2r1

$ kubectl get daemonset rancher -n cattle-system
NAME      DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                         AGE
rancher   1         1         1       1            1           node-role.kubernetes.io/master=true   2m27s

ํด๋Ÿฌ์Šคํ„ฐ์— rancher๊ฐ€ daemonset์œผ๋กœ ๋ฐฐํฌ๊ฐ€ ๋œ๋‹ค.

 

 

rancher Web UI ์„ธํŒ…

$ rancherd reset-admin
INFO[0000] Server URL: https://master01.centos.test:8443 
INFO[0000] Default admin and password created. Username: admin, Password: mrmgsgxfwn5tjcfkft42bbtq4m7rxsgdgm28p9mqc5qdnlcq7kfmw9 

rancher admin ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ resetํ•˜๊ณ  ์ƒˆ๋กญ๊ฒŒ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์–ป๋Š”๋‹ค.

host๋ช…์ด๋‚˜ ip๋กœ ์„œ๋ฒ„์˜ 8443ํฌํŠธ๋กœ ์ ‘๊ทผํ•œ๋‹ค.

 

์ง€์ •๋œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋กœ ์ ‘์†ํ•œ๋‹ค.

 

์ƒˆ๋กœ์šด ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์„ค์ •ํ•˜๊ณ  ์ง„ํ–‰ํ•œ๋‹ค.

 

rancherd-server ์„œ๋น„์Šค๊ฐ€ ์‹คํ–‰๋˜๋ฉด์„œ ํ•˜๋‚˜์˜ ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ํ•˜๋‚˜์˜ ๋…ธ๋“œ๊ฐ€ ์ถ”๊ฐ€ ๋œ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์—ฌ๊ธฐ๊นŒ์ง€๊ฐ€ rancher ์„ค์น˜์™€ ํ•˜๋‚˜์˜ ๋งˆ์Šคํ„ฐ ๋…ธ๋“œ๋ฅผ ๊ตฌ์„ฑํ•˜๋Š”๋ฐ๊นŒ์ง€ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ดํ›„์—๋Š” ์›Œ์ปค๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ํ•„์š”์— ์˜ํ•˜๋ฉด HA๊ตฌ์„ฑ์„ ์œ„ํ•ด master๋…ธ๋“œ๋ฅผ ๋” ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

 

Rancher ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค HA ๊ตฌ์„ฑ

์ฟ ๋ฒ„๋„คํ‹ฐ์Šค HA ๊ตฌ์„ฑ์„ ์œ„ํ•ด master ๋…ธ๋“œ๋ฅผ ํ•˜๋‚˜๋” ์ถ”๊ฐ€ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ฐฉ๋ฒ•์€ ์œ„์˜ ์ฒซ๋ฒˆ์งธ ๋…ธ๋“œ๋ฅผ ๋“ฑ๋กํ•˜๋Š” ๊ณผ์ •๊ณผ ์„ค์ •์—๋Œ€ํ•œ ์ˆ˜์ • ์ด์™ธ์—๋Š” ํฌ๊ฒŒ ์ฐจ์ด๋‚˜๋Š” ๋ถ€๋ถ„์€ ์—†์Šต๋‹ˆ๋‹ค.

rancherd๋ฅผ ์„ค์น˜ํ•˜๊ฒŒ๋˜๋ฉด rancherd-server์™€ rancherd-agent ์„œ๋น„์Šค๊ฐ€ ์ƒ๊ธฐ๋Š”๋ฐ rancherd-server๋กœ ์‹คํ–‰ํ•ด์ค˜์•ผ master ๋…ธ๋“œ๋กœ ์ธ์‹ํ•ฉ๋‹ˆ๋‹ค.

 

master node ์ถ”๊ฐ€

rancher config ์„ค์ •

/etc/rancher/rke2/config.yaml

server: https://master01.centos.test:9345
token: secret
tls-san:
  - master02.centos.test

 

rancherd ์„ค์น˜

$ curl -sfL https://get.rancher.io | sh -
[INFO]  finding release for channel latest
[INFO]  using v2.5.6 as release
[INFO]  downloading checksums at https://github.com/rancher/rancher/releases/download/v2.5.6/sha256sum.txt
[INFO]  downloading tarball at https://github.com/rancher/rancher/releases/download/v2.5.6/rancherd-amd64.tar.gz
[INFO]  verifying installer
[INFO]  unpacking tarball file

 

rancherd-server ์„œ๋น„์Šค ์‹คํ–‰

$ systemctl start rancherd-server

$ journalctl -eu rancherd-server -f
...
...
3์›” 11 07:01:34 master02.centos.test rancherd[9784]: time="2021-03-11T07:01:34-05:00" level=info msg="Handling backend connection request [master02.centos.test]"

 

Rancher ํด๋Ÿฌ์Šคํ„ฐ ์„ ํƒ > Nodes

์ •์ƒ์ ์œผ๋กœ ๋‘๋ฒˆ์งธ master๊ฐ€ ์˜ฌ๋ผ์˜จ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Roles์˜ ์—ญํ• ์„ ๋ดค์„๋•Œ etcd์™€ Control Plane์˜ ์—ญํ• ์„ ๊ฐ–๊ณ  ์žˆ๋‹ค๋ฉด master node๋กœ ์„ฑ๊ณต์ ์œผ๋กœ ๋ฐฐํฌ๋œ๊ฒƒ์ž…๋‹ˆ๋‹ค.

 

 

Worker ๋…ธ๋“œ ํด๋Ÿฌ์Šคํ„ฐ ์ถ”๊ฐ€

Worker ๋…ธ๋“œ๋Š” rancherd-server๊ฐ€ ์•„๋‹Œ rancherd-agent ์„œ๋น„์Šค๋ฅผ ์‹คํ–‰ํ•œ๋‹ค. ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ rancher config์— ๋Œ€ํ•œ ๋ถ€๋ถ„๊ณผ agent๋กœ ์‹คํ–‰ํ•˜๋Š”๊ฒƒ ์ด์™ธ์—๋Š” ์„ค์น˜ ๋‚ด์šฉ์ด ๋™์ผํ•˜๋‹ค.

 

Worker node ์ถ”๊ฐ€

rancher config ์„ค์ •

/etc/rancher/rke2/config.yaml

server: https://master01.centos.test:9345
token: secret

worker์˜ ๊ฒฝ์šฐ tls-san์— ๋Œ€ํ•œ ์ •๋ณด๋Š” ๊ธฐ์ž…ํ•˜์ง€ ์•Š๊ณ  server์™€ token๋งŒ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.

 

 

rancherd ์„ค์น˜

$ curl -sfL https://get.rancher.io | sh -
[INFO]  finding release for channel latest
[INFO]  using v2.5.6 as release
[INFO]  downloading checksums at https://github.com/rancher/rancher/releases/download/v2.5.6/sha256sum.txt
[INFO]  downloading tarball at https://github.com/rancher/rancher/releases/download/v2.5.6/rancherd-amd64.tar.gz
[INFO]  verifying installer
[INFO]  unpacking tarball file

 

rancherd-agent ์„œ๋น„์Šค ์‹คํ–‰

$ systemctl start rancherd-agent

$ journalctl -eu rancherd-agent -f
...
...
3์›” 11 07:26:59 worker01.centos.test rancherd[8940]: time="2021-03-11T07:26:59-05:00" level=info msg="labels have been set successfully on node: worker01.centos.test"

 

Rancher ํด๋Ÿฌ์Šคํ„ฐ ์„ ํƒ > Nodes

woker๋…ธ๋“œ๊ฐ€ ์ถ”๊ฐ€๋œ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํ•„์š”ํ•œ ๋…ธ๋“œ ์ˆ˜ ๋งŒํผ ํด๋Ÿฌ์Šคํ„ฐ์— ์ถ”๊ฐ€ํ•˜์—ฌ rancher๋ฅผ ํ†ตํ•ด์„œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ HA ๊ตฌ์„ฑ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

ํ์‡„๋ง ๋Œ€์ฒ˜๋ฐฉ๋ฒ•

์™ธ๋ถ€๋กœ ํ†ต์‹ ์ด ๊ฐ€๋Šฅํ•œ ํ™˜๊ฒฝ์ด๋ผ๋ฉด ์œ„์˜ ๋‚ด์šฉ๋Œ€๋กœ ํฌ๊ฒŒ ๋ฌธ์ œ ์—†์ด ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ• ๊ฒ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ... ๋Œ€๋ถ€๋ถ„์˜ ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์€ ํ์‡„๋ง์œผ๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ๊ณ  ์ œํ•œ๋˜๋Š” ๋ถ€๋ถ„์ด ๋งŽ์Šต๋‹ˆ๋‹ค. ์‚ฌ์‹ค ์™„์ „ํ•œ ํ์‡„๋ง์—์„œ Kubernetes์™€ Rancher๋ฅผ ์„ค์น˜ํ•ด๋ณด์ง€๋Š” ์•Š์•˜์ง€๋งŒ... ๋งŒ์•ฝ ์™ธ๋ถ€๋กœ ํ†ต์‹ ๊ฐ€๋Šฅํ•œ ํ”„๋ก์‹œ๊ฐ€ ์žˆ๋‹ค๋ฉด ํ”„๋ก์‹œ ์„ค์ •์œผ๋กœ ํ›„์— ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

 

rancherd ์„ค์น˜๋ฅผ ์œ„ํ•œ ํ”„๋ก์‹œ ์„ค์ •

rancherd๋ฅผ ์„ค์น˜ํ•˜๋Š”๋ฐ curl ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— centos ์šด์˜์ฒด์ œ์— ๋Œ€ํ•œ ํ”„๋ก์‹œ๋ฅผ ์„ค์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ์ฆ‰, ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์ด์šฉํ•ด์„œ ํ”„๋ก์‹œ ์„ค์ •์„ ํ•˜๊ฒŒ๋˜๋ฉด ํ”„๋ก์‹œ๋ฅผ ํ†ตํ•ด ์™ธ๋ถ€ ํ†ต์‹ ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

$ export HTTP_PROXY=<proxy address>:<proxy port>
$ export HTTPS_PROXY=<proxy address>:<proxy port>
$ export NO_PROXY=<exclude ip1>,<exclude ip2>...

ํ”„๋ก์‹œ์™€ ์˜ˆ์™ธ๊ฐ€ ํ•„์š”ํ•œ ์•„์ดํ”ผ๋ฅผ ์ง€์ •ํ•˜๊ณ  ์™ธ๋ถ€ ํ†ต์‹ ์œผ๋กœ rancherd๋ฅผ ์„ค์น˜ํ•œ๋‹ค.

 

rancherd ์„œ๋น„์Šค ์‹คํ–‰์— ํ•„์š”ํ•œ ํ”„๋ก์‹œ ์„ค์ •

rancherd ์„œ๋น„์Šค๋ฅผ ์‹คํ–‰ํ• ๋•Œ docker hub๋ฅผ ํ†ตํ•ด ํ•„์š”ํ•œ ์ด๋ฏธ์ง€๋“ค์„ ๋ฐ›๊ฒŒ๋œ๋‹ค. ๊ทธ๋ž˜์„œ ์™ธ๋ถ€ ํ†ต์‹ ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋ฉด rancherd๋ฅผ ํ†ตํ•ด ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์„ฑ์„ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ํ”„๋ก์‹œ๋ฅผ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ OS ๋‹จ์˜ ํ™˜๊ฒฝ๋ณ€์ˆ˜๊ฐ€ ์•„๋‹Œ ์„œ๋น„์Šค ๋ฐ๋ชฌ ์„ค์ •์— ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

 

/usr/local/lib/systemd/system/rancherd-server.service

/usr/local/lib/systemd/system/rancherd-agent.service

๊ฐ๊ฐ ์—ญํ• ์— ๋งž๊ฒŒ ๋งž๋Š” ์„œ๋น„์Šค์˜ ๊ตฌ๋™ ์„ค์ •์„ ๋ณ€๊ฒฝํ•œ๋‹ค.

...
...
 
Environment="HTTP_PROXY=<proxy address>:<proxy port>"
Environment="HTTPS_PROXY=<proxy address>:<proxy port>"
Environment="NO_PROXY=<exclude ip1>,<exclude ip2>..."

ํ•ด๋‹น Environment๋ฅผ ์ถ”๊ฐ€ํ•ด์„œ ์„œ๋น„์Šค ๊ตฌ๋™ ์‹œ ํ”„๋ก์‹œ๋ฅผ ํ†ตํ•ด docker hub์—์„œ ํ•„์š”ํ•œ ์ด๋ฏธ์ง€๋“ค์„ ๋ฐ›์•„ ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

 

๋Œ“๊ธ€