ЁЯПл The SchoolтА║ЁЯдЦ ArgoCDтА║ЁЯдЦ рдзрдбрд╛ 06 тАФ ArgoCD install рдХрд░рд╛: robot рд╢рд╛рд│реЗрдд рд░рд╛рд╣рд╛рдпрд▓рд╛ рдпреЗрддреЛ
ЁЯЦ╝я╕П See the drawing + lab ЁЯПа Course home ЁЯМ┐ Branch on GitHub тЬПя╕П View source
ЁЯЦ╝я╕П рдЖрдХреГрддреА рдЖрдгрд┐ labThe drawing + lab рдкреВрд░реНрдг рдкрд╛рдирд╛рд╡рд░ рдЙрдШрдбрд╛ тЖЧOpen full page тЖЧ

ЁЯдЦ рдзрдбрд╛ 06 тАФ ArgoCD install рдХрд░рд╛: robot рд╢рд╛рд│реЗрдд рд░рд╛рд╣рд╛рдпрд▓рд╛ рдпреЗрддреЛ

ЁЯУН рддреБрдореНрд╣реА рдЗрдереЗ рдЖрд╣рд╛рдд: 12 рдкреИрдХреА рдзрдбрд╛ 06 ┬╖ рдорд╛рдЧреЗ: lesson-05-gitops-idea ┬╖ рдкреБрдвреЗ: lesson-07-first-application


ЁЯУж рдпрд╛ рдмреНрд░рдБрдЪрдордзреНрдпреЗ рдХрд╛рдп рдЖрд╣реЗ

рдзрдбреЗ 01тАУ05, рдЖрдгрд┐ рддреНрдпрд╛рд╕реЛрдмрдд: рддреБрдордЪреНрдпрд╛ local cluster рдордзреНрдпреЗ ArgoCD install рдХрд░рдгреЗ рдЖрдгрд┐ рдлреЗрд░рдлрдЯрдХрд╛ рдорд╛рд░рдгреЗ тАФ UI, CLI, рдЖрдгрд┐ рдкреНрд░рддреНрдпреЗрдХ рд╣рд▓рдгрд╛рд░рд╛ рднрд╛рдЧ рдХрд╛рдп рдХрд░рддреЛ.

ЁЯзТ 5 рд╡рд░реНрд╖рд╛рдВрдЪреНрдпрд╛ рдореБрд▓рд╛рд▓рд╛ рд╕рдордЬрд╛рд╡рд▓реНрдпрд╛рд╕рд╛рд░рдЦреЗ

рдиреЗрдордгреБрдХреАрдЪрд╛ рджрд┐рд╡рд╕! ЁЯОЙ рдХреЗрдЕрд░рдЯреЗрдХрд░ robot ЁЯдЦ рдПрдХрд╛ рдореЛрдареНрдпрд╛ рдЦреЛрдХреНрдпрд╛рдд рдпреЗрддреЛ (рдПрдХрдЪ install manifest). рддреБрдореНрд╣реА рддреЗ рдЦреЛрдХреЗ рд╢рд╛рд│реЗрдЪреНрдпрд╛ рдЖрдд рдЙрдШрдбрддрд╛, рдЖрдгрд┐ рддреНрдпрд╛рдЪреЗ рднрд╛рдЧ рдмрд╛рд╣реЗрд░ рдпреЗрддрд╛рдд:

рдиреЗрдордгреБрдХреАрдЪреЗ рдорд╣рддреНрддреНрд╡рд╛рдЪреЗ рддрдкрд╢реАрд▓: robot рддреНрдпрд╛рдЪреНрдпрд╛ рд╕реНрд╡рддрдГрдЪреНрдпрд╛ рдЦреЛрд▓реАрдд рд░рд╛рд╣рддреЛ (namespace argocd), рдЖрдгрд┐ рддреЛ рд╢реВрдиреНрдп рдорддрд╛рдВрдиреА рд╕реБрд░реБрд╡рд╛рдд рдХрд░рддреЛ тАФ рддреБрдореНрд╣реА рддреНрдпрд╛рд▓рд╛ рдкреНрд▓реЕрдирдЪреЗ рдкрд╣рд┐рд▓реЗ рдкрд╛рди рджреЗрдИрдкрд░реНрдпрдВрдд (рдзрдбрд╛ 07) рддреЛ рдХрд╛рд╣реАрдЪ рдХрд░рдд рдирд╛рд╣реА.

ЁЯЧ║я╕П рдЖрдХреГрддреА

flowchart LR
    you["ЁЯзСтАНЁЯТ╗ you<br/>one kubectl apply"]
    subgraph cluster["ЁЯПл your cluster"]
        subgraph ns["ЁЯЪк namespace: argocd"]
            ui["ЁЯЦея╕П argocd-server<br/>API + web UI"]
            repo["ЁЯУЦ repo-server<br/>clones git repos"]
            ctrl["ЁЯФД application-controller<br/>the reconcile loop"]
        end
    end
    you -->|"1 install manifest"| ns
    you -->|"2 port-forward :8080<br/>login admin"| ui
    ctrl -.->|"3 waits patiently<br/>for its first plan page"| ctrl

тЭУ рдХрд╛рдп

ЁЯдФ рдкреНрд░рддреНрдпреЗрдХ cluster рдордзреНрдпреЗ рдХрд╛ install рдХрд░рд╛рдпрдЪрд╛?

рдХрд╛рд░рдг pull-based рдореНрд╣рдгрдЬреЗ рдкреНрд░рддреНрдпреЗрдХ cluster рд╕реНрд╡рддрдГрд╡рд░ рдкрд╣рд╛рд░рд╛ рджреЗрддреЛ: рддреНрдпрд╛рдЪрд╛ agent, рддреНрдпрд╛рдЪреНрдпрд╛ keys рдЖрддрдЪ рд░рд╛рд╣рддрд╛рдд, рд╡рд╣реАрдХрдбреЗ рдкрд╛рд╣рдгреНрдпрд╛рдЪреА рддреНрдпрд╛рдЪреА рд╕реНрд╡рддрдГрдЪреА рдирдЬрд░. (рдПрдХрдЪ ArgoCD рдЕрдиреЗрдХ clusters рдордзреНрдпрд╡рд░реНрддреАрдкрдгреЗ рд╕рд╛рдВрднрд╛рд│реВ рд╢рдХрддреЛ тАФ рд╣рд╛ рджреЗрдЦреАрд▓ рдпреЛрдЧреНрдп setup рдЖрд╣реЗ, рддреНрдпрд╛рдЪреЗ рдлрд╛рдпрджреЗ-рддреЛрдЯреЗ рдЖрд╣реЗрдд; рдЖрдзреА рд╕рд╛рдзрд╛ рдЖрдХрд╛рд░ рд╢рд┐рдХрд╛.)

ЁЯФз рдХрд╕реЗ + ЁЯзк рдХрд░реВрди рдкрд╛рд╣рд╛

# 1) hire the robot (any local cluster):
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# 2) wait for its parts to assemble:
kubectl -n argocd get pods -w        # ~1тАУ2 min until all Running; Ctrl+C

# 3) open its face:
kubectl -n argocd port-forward svc/argocd-server 8080:443 &
kubectl -n argocd get secret argocd-initial-admin-secret \
  -o jsonpath='{.data.password}' | base64 -d; echo
# browse https://localhost:8080 тЖТ login: admin + that password
# (self-signed cert warning is expected locally тАФ proceed)

# 4) optional but nice тАФ the CLI:
brew install argocd
argocd login localhost:8080 --username admin --insecure

# 5) look around the UI: zero Applications. The robot is hired,
#    bored, and waiting for lesson 07. ЁЯдЦЁЯТд

тЬЕ рддрдкрд╛рд╕рд╛ тАФ рддреБрдореНрд╣рд╛рд▓рд╛ рдХрд╛рдп рджрд┐рд╕рд╛рдпрд▓рд╛ рд╣рд╡реЗ

kubectl -n argocd get pods тЖТ рд╕рдЧрд│реЗ Running: argocd-server, argocd-repo-server, argocd-application-controller-0, рдЖрдгрд┐ redis, dex рдЖрдгрд┐ notifications. https://localhost:8080 рд╡рд░рдЪрд╛ UI admin + initial password рд╕реНрд╡реАрдХрд╛рд░рддреЛ рдЖрдгрд┐ рд╢реВрдиреНрдп Applications рджрд╛рдЦрд╡рддреЛ.

ЁЯз╣ рд╕рд╛рдлрд╕рдлрд╛рдИ

рдзрдбреЗ 07тАУ12 рд╕рд╛рдареА ArgoCD install рдХреЗрд▓реЗрд▓рд╛ рд░рд╛рд╣реВ рджреНрдпрд╛. рдирдВрддрд░ рддреЛ рдкреВрд░реНрдгрдкрдгреЗ рдХрд╛рдврд╛рдпрдЪрд╛ рдЕрд╕реЗрд▓ рддрд░: рдЖрдзреА рддреБрдордЪреЗ Applications delete рдХрд░рд╛ (рдзрдбрд╛ 07 рдЪреА рд╕рд╛рдлрд╕рдлрд╛рдИ), рдордЧ kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml && kubectl delete namespace argocd. Cloud cluster рд╡рд░ рдпрд╛рдореБрд│реЗ рдкреИрд╕реЗ рд▓рд╛рдЧрдгрд╛рд░реЗ рдХрд╛рд╣реАрдЪ рдерд╛рдВрдмрдд рдирд╛рд╣реА тАФ cluster рд╕реНрд╡рддрдГ рдирд╖реНрдЯ рд╣реЛрдИрдкрд░реНрдпрдВрдд nodes рдЖрдгрд┐ load balancers рдЪреЗ bill рдпреЗрдд рд░рд╛рд╣рддреЗ.

тЪая╕П рдиреЗрд╣рдореАрдЪреНрдпрд╛ рдЪреБрдХрд╛

ЁЯПн рдкреНрд░рддреНрдпрдХреНрд╖ рд╡рд╛рдкрд░рд╛рдд рд╣реЗ рдХрд╛ рдорд╣рддреНрддреНрд╡рд╛рдЪреЗ рдЖрд╣реЗ: рдЦрд▒реНрдпрд╛ installs рдордзреНрдпреЗ Helm chart рдХрд┐рдВрд╡рд╛ operator рд╡рд╛рдкрд░рддрд╛рдд, admin user рдРрд╡рдЬреА SSO, HA mode (sharded controllers, redis HA), рдЖрдгрд┐ ArgoCD рд╕реНрд╡рддрдГрд▓рд╛рд╣реА ArgoCD рдХрдбреВрдирдЪ рд╕рд╛рдВрднрд╛рд│рд▓реЗ рдЬрд╛рддреЗ (app-of-apps, рдзрдбрд╛ 11). рдПрдХрд╛ file рдЪреЗ install рдлрдХреНрдд рд╢рд┐рдХрдгреНрдпрд╛рд╕рд╛рдареА рдЖрд╣реЗ.

тПня╕П рдкреБрдвреЗ

Robot рд▓рд╛ рдкреНрд▓реЕрдирдЪреЗ рдкрд╣рд┐рд▓реЗ рдкрд╛рди рджреНрдпрд╛: рд╣рд╛рдЪ repo deploy рдХрд░рдгрд╛рд░реЗ Application.

git checkout lesson-07-first-application

ЁЯдЦ Lesson 06 тАФ Install ArgoCD: the robot moves into the school

ЁЯУН You are here: Lesson 06 of 12 ┬╖ Previous: lesson-05-gitops-idea ┬╖ Next: lesson-07-first-application


ЁЯУж What's in this branch

Lessons 01тАУ05, plus: installing ArgoCD into your local cluster and taking the tour тАФ UI, CLI, and what each moving part does.

ЁЯзТ Explain like I'm 5

Hiring day! ЁЯОЙ The caretaker robot ЁЯдЦ arrives in one big box (a single install manifest). You open the box inside the school, and out come its parts:

Important hiring details: the robot lives in its own room (namespace argocd), and it starts with zero opinions тАФ it does nothing until you hand it its first plan page (lesson 07).

ЁЯЧ║я╕П Diagram

flowchart LR
    you["ЁЯзСтАНЁЯТ╗ you<br/>one kubectl apply"]
    subgraph cluster["ЁЯПл your cluster"]
        subgraph ns["ЁЯЪк namespace: argocd"]
            ui["ЁЯЦея╕П argocd-server<br/>API + web UI"]
            repo["ЁЯУЦ repo-server<br/>clones git repos"]
            ctrl["ЁЯФД application-controller<br/>the reconcile loop"]
        end
    end
    you -->|"1 install manifest"| ns
    you -->|"2 port-forward :8080<br/>login admin"| ui
    ctrl -.->|"3 waits patiently<br/>for its first plan page"| ctrl

тЭУ What

ЁЯдФ Why install it per cluster?

Because pull-based means each cluster guards itself: its agent, its keys staying inside, its view of the book. (One ArgoCD can also manage many clusters centrally тАФ a valid setup with trade-offs; learn the simple shape first.)

ЁЯФз How + ЁЯзк Try it

# 1) hire the robot (any local cluster):
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# 2) wait for its parts to assemble:
kubectl -n argocd get pods -w        # ~1тАУ2 min until all Running; Ctrl+C

# 3) open its face:
kubectl -n argocd port-forward svc/argocd-server 8080:443 &
kubectl -n argocd get secret argocd-initial-admin-secret \
  -o jsonpath='{.data.password}' | base64 -d; echo
# browse https://localhost:8080 тЖТ login: admin + that password
# (self-signed cert warning is expected locally тАФ proceed)

# 4) optional but nice тАФ the CLI:
brew install argocd
argocd login localhost:8080 --username admin --insecure

# 5) look around the UI: zero Applications. The robot is hired,
#    bored, and waiting for lesson 07. ЁЯдЦЁЯТд

тЬЕ Verify тАФ what you should see

kubectl -n argocd get pods тЖТ everything Running: argocd-server, argocd-repo-server, argocd-application-controller-0, plus redis, dex and notifications. The UI at https://localhost:8080 accepts admin + the initial password and shows zero Applications.

ЁЯз╣ Clean up

Keep ArgoCD installed for lessons 07тАУ12. To remove it completely later: delete your Applications first (lesson 07's clean-up), then kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml && kubectl delete namespace argocd. On a cloud cluster this stops nothing that costs money тАФ nodes and load balancers bill until the cluster itself is destroyed.

тЪая╕П Common mistakes

ЁЯПн Why this matters in production: real installs use the Helm chart or the operator, SSO instead of the admin user, HA mode (sharded controllers, redis HA), and keep ArgoCD itself managed by ArgoCD (app-of-apps, lesson 11). The one-file install is for learning.

тПня╕П Next

Hand the robot its first plan page: the Application that deploys this very repo.

git checkout lesson-07-first-application
тЖР Previousgitops ideaNext тЖТfirst application

This page is the lesson's README from the lesson-06-install-argocd branch, shown here so the whole School stays on one site. Code files open on GitHub at the same branch.