k8s Service
[root@k8s-master12 ~]# cat nginx-svc.yaml
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: nginx #deploy名
name: nginx-svc #svc名
spec:
ports:
- port: 8123 #svc端口
protocol: TCP
targetPort: 80 #pod端口
selector:
app: nginx #deploy名
status:
loadBalancer: {}
[root@k8s-master12 ~]# cat /tmp/kubectl-edit-fw5b2.yaml
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{},"name":"ingress-ng-zzx","namespace":"default"},"spec":{"rules":[{"host":"www.zzx3.com","http":{"paths":[{"backend":{"serviceName":"nginx","servicePort":8123},"path":"/zzx/"}]}}]}}
creationTimestamp: "2022-04-10T04:46:13Z"
generation: 1
name: ingress-ng-zzx
namespace: default
resourceVersion: "299659"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/ingress-ng-zzx
uid: 34707960-7433-47ad-9797-470f262c2ba7
spec:
rules:
- host: www.zzx3.com
http:
paths:
- backend:
serviceName: nginx
servicePort: 8123
path: /zzx/
status:
loadBalancer: {}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
2015-04-10 mysql view 视图
2015-04-10 mysql 杂