Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$ minikube start


$ kubectl create -f cloudservice-service.yaml,isservice-service.yaml,postgres-service.yaml,redis-service.yaml,cloudservice-deployment.yaml,isservice-deployment.yaml,isservice-claim0-persistentvolumeclaim.yaml,postgres-deployment.yaml,db-volume-persistentvolumeclaim.yaml,redis-deployment.yaml 

service/cloudservice created
service/isservice created
service/postgres created
service/redis created
deployment.extensions/cloudservice created
deployment.extensions/isservice created
persistentvolumeclaim/isservice-claim0 created
deployment.extensions/postgres created
persistentvolumeclaim/db-volume created
deployment.extensions/redis created


Expose a service

> kubectl expose deployment cloudservice --type=NodePort --name=cload-service

Code Block
$ kubectl expose deployment cloudservice --type=NodePort --name=cload-service
service/cload-service exposed


$ kubectl get services

NAME             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
cload-service    NodePort    10.105.166.253   <none>        8080:32696/TCP   5s
cloudservice     ClusterIP   10.107.194.8     <none>        80/TCP           37m
hello-minikube   NodePort    10.106.20.131    <none>        8080:32733/TCP   224d
isservice        ClusterIP   10.101.181.189   <none>        7080/TCP         37m
kubernetes       ClusterIP   10.96.0.1        <none>        443/TCP          224d
postgres         ClusterIP   10.105.249.194   <none>        5432/TCP         37m
redis            ClusterIP   10.98.155.80     <none>        6379/TCP         37m


Pulling image from Docker Registry

...