App ίϯςφͰΞϓϦέʔγϣϯͷӡ༻ 18 docker-compose01.yaml docker-compose02.yaml MySQL Nginx App Redis SERVER Nginx SERVER ‣ ͨ͘͞Μͷαʔόʔʹͨ͘͞ΜͷίϯςφΛஔ͍ͯ࿈ܞ %PDLFS$PNQPTFͰͲ͏ʹ͔ஔͯ͠Έͨͱ͜Ζ
App ίϯςφͰΞϓϦέʔγϣϯͷӡ༻ 19 docker-compose01.yaml docker-compose02.yaml MySQL Nginx App Redis SERVER Nginx SERVER ‣ ͨ͘͞Μͷαʔόʔʹͨ͘͞ΜͷίϯςφΛஔ͍ͯ࿈ܞ %PDLFS$PNQPTFͰͲ͏ʹ͔ஔͯ͠Έͨͱ͜Ζ
App ίϯςφͰΞϓϦέʔγϣϯͷӡ༻ 20 docker-compose01.yaml docker-compose02.yaml MySQL Nginx App Redis SERVER Nginx SERVER ‣ ͨ͘͞Μͷαʔόʔʹͨ͘͞ΜͷίϯςφΛஔ͍ͯ࿈ܞ %PDLFS$PNQPTFͰͲ͏ʹ͔ஔͯ͠Έͨͱ͜Ζ
App ίϯςφͰΞϓϦέʔγϣϯͷӡ༻ 21 docker-compose01.yaml docker-compose02.yaml MySQL Nginx App Redis SERVER Nginx SERVER ‣ ͨ͘͞Μͷαʔόʔʹͨ͘͞ΜͷίϯςφΛஔ͍ͯ࿈ܞ %PDLFS$PNQPTFͰͲ͏ʹ͔ஔͯ͠Έͨͱ͜Ζ
App SERVER App ίϯςφͰΞϓϦέʔγϣϯͷӡ༻ 22 docker-compose01.yaml docker-compose02.yaml MySQL Nginx App Redis SERVER Nginx SERVER ‣ ͨ͘͞Μͷαʔόʔʹͨ͘͞ΜͷίϯςφΛஔ͍ͯ࿈ܞ %PDLFS$PNQPTFͰͲ͏ʹ͔ஔͯ͠Έͨͱ͜Ζ
App SERVER App ίϯςφͰΞϓϦέʔγϣϯͷӡ༻ 23 docker-compose01.yaml docker-compose02.yaml MySQL Nginx App Redis SERVER Nginx SERVER ‣ ͨ͘͞Μͷαʔόʔʹͨ͘͞ΜͷίϯςφΛஔ͍ͯ࿈ܞ %PDLFS$PNQPTFͰͲ͏ʹ͔ஔͯ͠Έͨͱ͜Ζ
LVCFDUMͷ&,4༻DPOpHϑΝΠϧΛ࡞ 94 $ aws eks update-kubeconfig --name eks-handson # ಈ࡞֬ೝ $ kubectl get all NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10.100.0.1 443/TCP 1h
αϯϓϧΞϓϦΛσϓϩΠ͢Δ 101 # ҰมߋΛͱʹ͢ $ cd example $ cd git reset --hard $ cd ../ # frontend-serviceͷλΠϓΛLoadBalancerʹมߋ # Ϋϥυͷϩʔυόϥϯαʔ(͜͜ͰELB)ͱ࿈ܞ͢ΔλΠϓ $ vi examples/guestbook/frontend-service.yaml 9-13ߦ # comment or delete the following line if you want to use a LoadBalancer type: NodePort # if your cluster supports it, uncomment the following to automatically create # an external load-balanced IP for the frontend service. # type: LoadBalancer # apply! $ kubectl apply -f examples/guestbook/
αϯϓϧΞϓϦΛσϓϩΠ͢Δ 112 # ҰมߋΛͱʹ͢ $ cd examples $ git reset --hard $ cd ../ # frontend-serviceͷλΠϓΛLoadBalancerʹมߋ # Ϋϥυͷϩʔυόϥϯαʔ(͜͜ͰELB)ͱ࿈ܞ͢ΔλΠϓ $ vi examples/guestbook/frontend-service.yaml 9-13ߦ # comment or delete the following line if you want to use a LoadBalancer type: NodePort # if your cluster supports it, uncomment the following to automatically create # an external load-balanced IP for the frontend service. # type: LoadBalancer # apply! $ kubectl apply -f examples/guestbook/
w ͪΖΜ҉߸Խత͡Όͳ͍ͷͰɺͦͷ··(JUIVCʹ্͛ͨΓͨ͠Βμϝ ઃఆʹΑͬͯ FUDE্ʹ҉߸Խͨ͠ঢ়ଶͰอଘ͞ΕΔ /PEFͰ1PEͷUNQGT ཁ͢ΔʹϝϞϦ ্ʹอଘ͞ΕΔ /PEFׂΓͯΒΕͨ1PE͕ࢀর͢Δ4FDSFUҎ֎ΞΫηεͰ͖ͳ͍ ͍͔ͭ͘5ZQF͕͋Δ w 0QBRVF$POpH.BQͱಉ͡ߏԽ͞Εͯͳ͍,FZ7BMVFܗࣜ w LVCFSOFUFTJPUMT5-4ͷൿີݤͱެ։ݤΛ֨ೲ w LVCFSOFUFTJPTFSWJDFBDDPVOUUPLFO,VCFSOFUFTͷαʔϏεΞΧϯτͷΫϨσϯγϟϧ 158
ϚχϑΣετϑΝΠϧͷϑΥʔϚοτ 162 # "kubectl explain [Ϧιʔε] --recursive" ͰશମͷϑΥʔϚοτΛදࣔ $ kubectl explain service --recursive KIND: Service VERSION: v1 DESCRIPTION: Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy. FIELDS: apiVersion kind metadata annotations (ུ) # ֊Λࢦఆ͢Δͱͦͷ߲ͷઆ໌͕֬ೝͰ͖Δ $ kubectl explain service.spec.type KIND: Service VERSION: v1 FIELD: type DESCRIPTION: type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. (ུ)