Thursday 30 June 2022

Creating and Configuring the Deployment in Kubernetes using OpenShift

Creating the Deployment

kubectl create deployment myapp1 

deployment.apps/myapp1 created

kubectl get deployment


myapp1   1/1     1            1           14s

kubectl get po

NAME                     READY   STATUS    RESTARTS       AGE

myapp1-bcb89d7dd-hvxgk   1/1     Running   0              101s

Accessing the Pod

kubectl expose deployment myapp1 --port=8080

service/myapp1 exposed

kubectl get svc

NAME              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE

kubernetes        ClusterIP       <none>        443/TCP        5d6h

myapp1            ClusterIP   <none>        8080/TCP       33s


Hello OpenShift!

No comments:

Post a Comment