Docker Cookbook



Download 6,31 Mb.
Pdf ko'rish
bet128/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   124   125   126   127   128   129   130   131   ...   260
Bog'liq
Docker Cookbook

152 | Chapter 5: Kubernetes


net: 
"host"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: /hyperkube kubelet --api_servers=http://localhost:8080 --v=2 \
--address=0.0.0.0 \
--enable_server --hostname_override=127.0.0.1 \
--config=/etc/kubernetes/manifests
proxy:
image: gcr.io/google_containers/hyperkube:v0.14.1
net: 
"host"
privileged: true
command: /hyperkube proxy --master=http://127.0.0.1:8080 --v=2
Three containers are started by Compose: one container running 
etcd
, one container
running the Kubernetes proxy service, and one container running the Kubernetes
kubelet. Both the service proxy and the kubelet are running from the same image and
using the same binary that is called through the command option. This binary is
hyperkube
, a very nice utility binary that you can use to start all the components of a
Kubernetes cluster.
The clever part is that the 
master
container calls 
hyperkube
by specifying a configura‐
tion file in 
/etc/kubernetes/manifests
located within the container image. You can
check what is in this manifest by running a new ephemeral container:
$ docker run --rm -it gcr.io/google_containers/hyperkube:v0.14.1 cat /etc/ \
kubernetes/manifests/master.json
{
"apiVersion": "v1beta3",
"kind": "Pod",
"metadata": {"name":"nginx"},
"spec":{
"hostNetwork": true,
"containers":[
{
"name": "controller-manager",
"image": "gcr.io/google_containers/hyperkube:v0.14.1",
"command": [
"/hyperkube",
"controller-manager",
"--master=127.0.0.1:8080",
"--machines=127.0.0.1",
"--sync_nodes=true",
"--v=2"
]
},
{
"name": "apiserver",
"image": "gcr.io/google_containers/hyperkube:v0.14.1",
"command": [
"/hyperkube",
"apiserver",

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   124   125   126   127   128   129   130   131   ...   260




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish