service-ingress

Solid

Kubernetes Service 与 Ingress

AI & Automation 1 stars 0 forks Updated yesterday Apache-2.0

Install

View on GitHub

Quality Score: 79/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Service 与 Ingress ## 概述 服务暴露、Ingress 配置、TLS 终止等技能。 ## Service 类型 ### ClusterIP(默认) ```yaml apiVersion: v1 kind: Service metadata: name: my-service spec: type: ClusterIP selector: app: nginx ports: - port: 80 targetPort: 8080 ``` ### NodePort ```yaml apiVersion: v1 kind: Service metadata: name: my-service spec: type: NodePort selector: app: nginx ports: - port: 80 targetPort: 8080 nodePort: 30080 # 30000-32767 ``` ### LoadBalancer ```yaml apiVersion: v1 kind: Service metadata: name: my-service spec: type: LoadBalancer selector: app: nginx ports: - port: 80 targetPort: 8080 ``` ### ExternalName ```yaml apiVersion: v1 kind: Service metadata: name: external-db spec: type: ExternalName externalName: db.example.com ``` ### Headless Service ```yaml apiVersion: v1 kind: Service metadata: name: headless-service spec: clusterIP: None selector: app: nginx ports: - port: 80 ``` ## Service 操作 ```bash # 查看 Service kubectl get svc kubectl get svc -o wide kubectl describe svc service-name # 创建 Service kubectl expose deploy deployment-name --port=80 --target-port=8080 kubectl expose deploy deployment-name --type=NodePort --port=80 # 删除 Service kubectl delete svc service-name # 测试 Service kubectl run test --rm -it --image=busybox -- wget -qO- http://service-name ``` ## Ingress 配置 ### 基础 Ingress ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: my-ingress annotations: ...

Details

Author
ryukyagamilight
Repository
ryukyagamilight/terminal-skills
Created
5 months ago
Last Updated
yesterday
Language
N/A
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category