Kubernetes Service Manifest: Difference between revisions
Jump to navigation
Jump to search
(→labels) |
|||
Line 13: | Line 13: | ||
[[Kubernetes_Manifest_Metadata#Overview|metadata]]: | [[Kubernetes_Manifest_Metadata#Overview|metadata]]: | ||
[[Kubernetes_Manifest_Metadata#name|name]]: blue | [[Kubernetes_Manifest_Metadata#name|name]]: blue | ||
[[ | [[#labels|labels]]: | ||
size: large | size: large | ||
[[Kubernetes_Manifests#spec|spec]]: | [[Kubernetes_Manifests#spec|spec]]: |
Revision as of 00:29, 20 September 2020
External
Internal
Example
apiVersion: v1 kind: Service metadata: name: blue labels: size: large spec: type: ClusterIP selector: function: front-end # Label selector, the service is looking for # pods with the label "function=front-end" ports: - port: 80 targetPort: 8080 protocol: TP
.metadata Elements
labels
The labels declared here apply to the service instance itself, they have no relationship to the target pods' labels, which are declared in the spec selector. Also see:
.spec Elements
type
Optional element. If not specified, it is assumed to be "ClusterIP".