Docker Cookbook


"kind" : "Pod" , "apiVersion"



Download 6,31 Mb.
Pdf ko'rish
bet202/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   198   199   200   201   202   203   204   205   ...   260
Bog'liq
Docker Cookbook

"kind"
:
"Pod"
,
"apiVersion"
:
"v1"
,
"metadata"
:
{
"name"
:
"nginx"
,
8.10 Using Kubernetes in the Cloud via GCE | 257


"labels"
:
{
"app"
:
"nginx"
}
},
"spec"
:
{
"containers"
:
[
{
"name"
:
"nginx"
,
"image"
:
"nginx"
,
"ports"
:
[
{
"containerPort"
:
80
,
"protocol"
:
"TCP"
}
]
}
]
}
}
Start the pod and check its status. Once it is running and you have a firewall with port
80 open for the cluster nodes, you will be able to see the Nginx welcome page. Addi‐
tional examples are available on the Kubernetes GitHub 
page
.
$ kubectl create -f nginx.json
pods/nginx
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 1/1 Running 0 20s
wordpress 1/1 Running 0 17m
To clean things up, remove your pods, exit the master node, and delete your cluster:
$ kubectl delete pods nginx
$ kubectl delete pods wordpress
$ gcloud container clusters delete cook
See Also
• Cluster 
operations
• Pod 
operations
• Service 
operations
• Replication controller 
operations
258 | Chapter 8: Docker in the Cloud


8.11 Setting Up to Use the EC2 Container Service
Problem
You want to try the new Amazon AWS EC2 container service (ECS).
Solution
ECS is a generally available service of Amazon Web Services. Getting set up to test
ECS involves several steps. This recipe summarizes the main steps, but you should
refer to the official 
documentation
 for all details:
1.
Sign up
 for AWS if you have not done so.
2. Log in to the AWS console. Review 
Recipe 8.1
 and 
Recipe 8.2
 if needed. You will
launch ECS instances within a security group associated with a VPC. Create a
VPC and a security group, or ensure that you have default ones present.
3. Go to the IAM console and create a role for ECS. If you are not familiar with
IAM, this step is a bit advanced and can be followed step by step on the 
AWS
documentation for ECS
.
4. For the role that you just created, create an inline 
policy
. If successful, when you
select the Show Policy link, you should see 
Figure 8-11
. See the discussion section
of this recipe for an automated way of creating this policy using 
Boto
.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   198   199   200   201   202   203   204   205   ...   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