Difference between revisions of "Kubectl create service externalname"

From wikieduonline
Jump to navigation Jump to search
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
https://kubernetes.io/docs/concepts/services-networking/service/#externalname
 
https://kubernetes.io/docs/concepts/services-networking/service/#externalname
 +
map a Service to a DNS name.
  
 
  [[kubectl create service]] externalname
 
  [[kubectl create service]] externalname
  
[[kind: ExternalName]]
 
  
<pre>
+
 
apiVersion: v1
+
apiVersion: v1
kind: Service
+
[[kind: Service]]
metadata:
+
[[metadata:]]
  name: my-service
+
  name: my-service
  namespace: prod
+
  namespace: prod
spec:
+
[[spec:]]
  type: ExternalName
+
  type: ExternalName
  externalName: my.database.example.com
+
  [[externalName]]: my.database.example.com
</pre>
+
 
 +
== Related ==
 +
* <code>[[kubectl describe services]]</code>
 +
* [[Kubernetes: Ingress controllers]]: <code>[[helm install nginx]]</code>
 +
* [[Kubernetes DNS]]
  
 
== See also ==
 
== See also ==

Latest revision as of 20:18, 8 November 2023

Advertising: