Kubernetes - deploying to a cluster (real cluster)



Surprisingly deploying to a cluster is pretty straight forward.

To run or deploy your application to cluster, issue the following command :-



kubectl run --kubeconfig connect_config.txt connectcd --image=kepung/dotnetapp-prod
--port=5050




The only different is --kubeconfig - which is a file storing your cluster info including access.

Next, to ensure, we expose our port with a service, using command below :-


kubectl --kubeconfig connect_config.txt expose deployment/connectcd
--type="LoadBalancer" --port=5050 --name=connectcd-http


That's pretty much it.

To get the service url for your pod, you can use the following command :-

kubectl --kubeconfig connect_config.txt get service connectcd-http -o yaml


You will see the following output and it contains the DNS of the newly deployed service. Please wait for a few seconds for AWS DNS to have it registered in there.








Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm