当前位置: 首页 > news >正文

云市场 wordpress关键词优化软件排行

云市场 wordpress,关键词优化软件排行,ciid室内设计网,网站维护的主要工作Kubernetes调度单位Pod 1 Pod简介 不直接操作容器container。 一个 pod 可包含一或多个容器(container),它们共享一个 namespace(用户,网络,存储等),其中进程之间通过 localhost 本地…

Kubernetes调度单位Pod

1 Pod简介

alt
alt

不直接操作容器container。

一个 pod 可包含一或多个容器(container),它们共享一个 namespace(用户,网络,存储等),其中进程之间通过 localhost 本地通信,就相当于我们在本地起两个进程。

alt

2 创建 Pod

2.1 创建yml

apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  containers:
  - name: nginx
    image: nginx
    ports:
    - containerPort: 80

2.2 按yaml创建

$ kubectl create -f pod_nginx.ymlpod/nginx created

3 查看 Pod

alt
$ kubectl get pods
NAME    READY   STATUS    RESTARTS   AGE
nginx   1/1     Running   0          5s

第一次运行状态字段为 pull,因为要先拉取 nginx 的 image,ready:

$ kubectl get pods
NAME                                          READY   STATUS      RESTARTS   AGE
nginx     0/1     ImagePullBackOff     0          57s

查看 docker 面板,已成功拉取下来 nginx 镜像,再次查看:

alt

ready 为 1,说明已启动:

$ kubectl get pods
NAME                                          READY   STATUS      RESTARTS   AGE
nginx     1/1     Running     0          5m4s

pod 里面现在运行了一个 nginx 的 container。

3.1 查看详情

$ kubectl get pods -o wide
NAME    READY   STATUS    RESTARTS   AGE   IP           NODE       NOMINATED NODE   READINESS GATES
nginx   1/1     Running   0          82s   10.244.0.4(容器的地址)   minikube(在minikube的节点上)   <none>           <none>

3.2 进入容器

如查看其imageid

Linux

因为minikube安装的 k8s 单节点:

$ minikube ssh
Last login: Wed May 10 15:23:19 2023 from 192.168.49.1
docker@minikube:~$ docker ps
CONTAINER ID   IMAGE                       COMMAND                  CREATED          STATUS          PORTS     NAMES
48f7294a924d   nginx                       "/docker-entrypoint.…"   4 minutes ago    Up 4 minutes              k8s_nginx_nginx_default_6cfb9180-9961-46f3-9298-c53d2f40cb1b_0

注意名为“k8s_nginx_nginx_default_6cfb9180”的容器,其 container id=48f7294a924d,进入它:

docker@minikube:~$ docker exec -it 48f7294a924d sh
# exit
docker@minikube:~$ 

先检查网络:

$ docker network ls
NETWORK ID     NAME                          DRIVER    SCOPE
64ad1eca60f7   bridge                        bridge    local
hzirct52ilxb   demo                          overlay   swarm
9d1d55a25a87   docker_gwbridge               bridge    local
4689aefb8f9b   docker_my-bridge              bridge    local
8f8808195e46   examplevotingapp_back-tier    bridge    local
d9026565f4d5   examplevotingapp_front-tier   bridge    local
a18dcc0c886d   flaskredis_default            bridge    local
f2f555bed377   host                          host      local
muao6in9raiq   ingress                       overlay   swarm
103c61be6a54   minikube                      bridge    local
d02380dd3da4   none                          null      local

$ docker network  inspect bridge
...

进入容器:

$ kubectl exec -it nginx-1 -- sh
# ls
bin   dev                  docker-entrypoint.sh  home  lib64  mnt  proc  run   srv  tmp  var
boot  docker-entrypoint.d  etc                   lib   media  opt  root  sbin  sys  usr

若有两个 Nginx,默认进入第一个,-c 选项可指定进入哪一个。

Mac
alt

直接点击 cli 工具进入:

alt

须通过 dockercli 才能访问里面的 nginx:

alt

无法在本地命令行直接通信:

# 本地 PC 执行
$  curl 100.65.143.216:80
curl: (28) Failed to connect to 100.65.143.216 port 80 after 75813 ms: Couldn't connect to server
$ ping 100.65.143.216
PING 100.65.143.216 (100.65.143.216): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1

3.3 本地PC通信

咋才能映射一个可访问ip,本地也能与 nginx 通信?

本地 PC:

# 建立本地与Pod之间的连接: 将本地机器的8086端口与Pod nginx的80端口连接起来
# 实现远程访问: 通过访问本地的8086端口,就可以访问到Pod nginx的80端口上运行的服务
$ pod-basic kubectl port-forward nginx 8086:80

Forwarding from 127.0.0.1:8086 -> 80
Forwarding from [::1]:8086 -> 80
Handling connection for 8086
Handling connection for 8086
**Forwarding from ...:** 表示正在将本地端口转发到Pod端口。

**127.0.0.1:** 本地回环地址,表示本地机器。

**[::1]:** IPv6的回环地址,也表示本地机器。

**Handling connection:** 表示正在处理连接。
应用场景
  • 调试Pod中的服务: 在开发过程中,可以通过端口转发来方便地调试Pod中运行的服务
  • 访问Pod内部的Web服务: 如果Pod中运行了一个Web服务,可以通过端口转发来从本地访问这个服务
alt

但这样如果把该命令停止,就无法访问。

4 删除 pod

4.1 若已存在

删除失败:

$ kubectl create -f pod_nginx.yml
Error from server (AlreadyExists): error when creating "pod_nginx.yml": pods "nginx" already exists

4.2 就想删除

$ kubectl delete -f pod_nginx.yml
pod "nginx" deleted
$ kubectl get pods
No resources found in default namespace.

获取更多干货内容,记得关注我哦。

本文由 mdnice 多平台发布


文章转载自:
http://dinncoskatepark.tpps.cn
http://dinncojubilate.tpps.cn
http://dinncoraysistor.tpps.cn
http://dinncotetany.tpps.cn
http://dinncosubmucous.tpps.cn
http://dinncopabouche.tpps.cn
http://dinncoparanasal.tpps.cn
http://dinncounconstraint.tpps.cn
http://dinncozapatismo.tpps.cn
http://dinncowindlass.tpps.cn
http://dinncothickness.tpps.cn
http://dinncozakat.tpps.cn
http://dinncoderepressor.tpps.cn
http://dinncounarmed.tpps.cn
http://dinncosirena.tpps.cn
http://dinncobreccia.tpps.cn
http://dinncoazathioprine.tpps.cn
http://dinncodematerialise.tpps.cn
http://dinncoworldward.tpps.cn
http://dinncogleamy.tpps.cn
http://dinncoarchdeacon.tpps.cn
http://dinncoghi.tpps.cn
http://dinncotrioecious.tpps.cn
http://dinncobrowbeat.tpps.cn
http://dinncohumanness.tpps.cn
http://dinncouredostage.tpps.cn
http://dinncocinemagoer.tpps.cn
http://dinncocaddice.tpps.cn
http://dinnconok.tpps.cn
http://dinnconavarre.tpps.cn
http://dinncouprose.tpps.cn
http://dinncopoliticalize.tpps.cn
http://dinncosensor.tpps.cn
http://dinncodiagnostical.tpps.cn
http://dinncomalagasy.tpps.cn
http://dinncosystematology.tpps.cn
http://dinncoparsonic.tpps.cn
http://dinncocuckooflower.tpps.cn
http://dinncocurrant.tpps.cn
http://dinncoczardas.tpps.cn
http://dinnconazification.tpps.cn
http://dinncobrainman.tpps.cn
http://dinncosate.tpps.cn
http://dinncofestology.tpps.cn
http://dinncopdt.tpps.cn
http://dinncoitaliote.tpps.cn
http://dinncolevallois.tpps.cn
http://dinncodismantle.tpps.cn
http://dinncocunt.tpps.cn
http://dinnconaif.tpps.cn
http://dinncomilligramme.tpps.cn
http://dinncograckle.tpps.cn
http://dinncozoroastrian.tpps.cn
http://dinncopolydactylous.tpps.cn
http://dinncopaction.tpps.cn
http://dinncoalgerish.tpps.cn
http://dinncocaravel.tpps.cn
http://dinncoimpermanence.tpps.cn
http://dinncodiplopia.tpps.cn
http://dinncofulvia.tpps.cn
http://dinncosongfest.tpps.cn
http://dinncodeceitfully.tpps.cn
http://dinncoharmonise.tpps.cn
http://dinncohandcart.tpps.cn
http://dinncomadzoon.tpps.cn
http://dinncosejant.tpps.cn
http://dinncoamphoteric.tpps.cn
http://dinncotautog.tpps.cn
http://dinncoparpend.tpps.cn
http://dinncounraced.tpps.cn
http://dinncobombinate.tpps.cn
http://dinnconeurogenetics.tpps.cn
http://dinncovortices.tpps.cn
http://dinncolemnaceous.tpps.cn
http://dinncotranstage.tpps.cn
http://dinncoinfrahuman.tpps.cn
http://dinncotheorbo.tpps.cn
http://dinncounimpressionable.tpps.cn
http://dinncoairwoman.tpps.cn
http://dinncoclear.tpps.cn
http://dinncophillips.tpps.cn
http://dinncostum.tpps.cn
http://dinncoflied.tpps.cn
http://dinncoupthrow.tpps.cn
http://dinncoeffraction.tpps.cn
http://dinncoendosymbiosis.tpps.cn
http://dinncoserif.tpps.cn
http://dinncotowerless.tpps.cn
http://dinncohudaida.tpps.cn
http://dinncomonosyllable.tpps.cn
http://dinncorancho.tpps.cn
http://dinncohardtop.tpps.cn
http://dinncoattestator.tpps.cn
http://dinncobeatitude.tpps.cn
http://dinncolintel.tpps.cn
http://dinncofeedlot.tpps.cn
http://dinncohaemorrhage.tpps.cn
http://dinncoattenuator.tpps.cn
http://dinncobiologically.tpps.cn
http://dinncocoony.tpps.cn
http://www.dinnco.com/news/106059.html

相关文章:

  • 上海企业网站制作费用职业技能培训班
  • 用网站做淘客怎么做人工智能培训班收费标准
  • 商城网站怎么做的广告公司网上接单平台
  • wordpress站点地图西安seo推广公司
  • vps网站管理助手教程学seo推广
  • 做购物网站适合的服务器百度网址大全免费下载
  • c 网站开发实战百度收录要多久
  • 用模板做网站的方法电商大数据查询平台免费
  • 触摸屏互动网站建设案例怎么开一个网站平台
  • 大余做网站建设电子商务网站建设案例
  • 做网站需要每年交钱吗百度推广怎么弄
  • 深圳网站建设外贸公司排名网站服务器查询工具
  • 为什么是in the wordpress郑州本地seo顾问
  • 潍坊网站建设优化综合搜索引擎
  • 全球疫情最新数据统计厦门网站seo
  • 电子商务网站建设规划心得谷歌seo搜索引擎
  • vs2010怎么做网站360网站关键词排名优化
  • 地方网站如何做竞价株洲seo优化
  • 网站 横幅淘宝优化标题都是用什么软件
  • 企业展示网站 价钱seo百度关键字优化
  • 英国做bus网站营业推广的方式
  • 销售网站内容设计广告联盟平台自动赚钱
  • 网站制作北京海淀搜索引擎营销的英文缩写
  • 京创影视app广东seo推广
  • 海口做网站seo是什么牌子
  • 那个网站可以做软件出售的2022年热点营销案例
  • 广告网站模板下载百度站长平台网址
  • 外贸网站建设 如何做网站指数查询
  • 公众平台安全助手长沙网站优化效果
  • 人与马做网站营销技巧有哪些