Creating Services through Declarative Syntax
Learn to create Services through declarative syntax.
Looking into the syntax
We can accomplish a similar result as the one using kubectl expose through the go-demo-2-svc.yml specification shown below:
-
Lines 1–4: Since we have already discussed the meaning of
apiVersion,kind, andmetadata, we’ll jump straight into the spec section. -
Line 5: Since we have already explored some of the options through the
kubectl exposecommand, the ...