Docker Cookbook



Download 6,31 Mb.
Pdf ko'rish
bet137/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   133   134   135   136   137   138   139   140   ...   260
Bog'liq
Docker Cookbook

166 | Chapter 5: Kubernetes


See Also
• Secure access to the API 
server
• Accessing a 
cluster
• Authentication 
plug-ins
• Authorization 
roadmap
5.16 Configuring the Kubernetes Client to Access Remote
Clusters
Problem
You are exposing the API server securely by using an authentication mechanism and
you would like your users to access the cluster remotely by using one of the clients
(e.g., 
kubectl
).
Solution
Use 
kubectl
configuration to create multiple contexts for accessing your clusters. In
each context, specify the cluster API endpoint and the user credentials.
Indeed, 
kubectl
by default communicates with an API server on localhost. But you
can define multiple endpoints (useful if using multiple clusters in different regions,
for instance) and multiple user profiles (e.g., production, development, service) that
may have different authorization policies. The first time you install 
kubectl
, your
configuration will be empty. Run 
kubectl config view
to verify it as shown here:
$ ./kubectl config view
apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []
You can use multiple options to define a cluster, a context, and some user credentials.
The following is an example of setting up a cluster named 
k
, defined by an HTTPS
endpoint with a self-signed certificate; a context 
kcon
is created that uses cluster 
k
and
user 
superfoobar
. The 
superadmin
user has a set of credentials that were set up in
Recipe 5.15
. At the end of the example, you set the current context: 
use-context
.
This has the intended results that you can use 
kubectl
and that it will properly form

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   133   134   135   136   137   138   139   140   ...   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