What is the best imperative command to create the jekyll service?
kubectl create service nodeport jekyll --tcp=8080:4000 --node-port=30097 --namespace=development --dry-run=client -o jekyll-node-service.yaml
This requires a change from app=jekyll
to run=jekyll
in spec.selector
.
kubectl expose pod jekyll --name=jekyll --target-port=4000 --port=8080 --namespace=development --dry-run=client -o yaml > jekyll-node-service.yaml
This requires adding the type: NodePort
and nodePort: 30097
Both require a dry-run and editing the yaml. Is there a way to do this using only an imperative command?