首页 » 翻译 » Kubernetes » 正文

Kubernetes 常用命令 CKA

POD

Create an NGINX Pod

 

Generate POD Manifest YAML file (-o yaml). Don’t create it(–dry-run)

 

Deployment

Create a deployment

 

Generate Deployment YAML file (-o yaml). Don’t create it(–dry-run)

 

Save it to a file – (If you need to modify or add some other details)

 

Service

Create a Service named redis-service of type ClusterIP to expose pod redis on port 6379

Or

Create a Service named nginx of type NodePort to expose pod nginx’s port 80 on port 30080 on the nodes:

Or

 

 

Zhiming Zhang

Senior devops at Appannie
一个奔跑在运维路上的胖子
Zhiming Zhang

Latest posts by Zhiming Zhang (see all)