Closed izugbokwe closed 5 years ago
[ec2-user@ip-172-31-21-42 kops-kubenet-demo]$ cd configFiles/ [ec2-user@ip-172-31-21-42 configFiles]$ ls busyboxDeployment.yaml serviceClusterIp.yaml serviceNodePort.yaml client.yaml serviceLoadBalancer.yaml simpleHttpServer.yaml [ec2-user@ip-172-31-21-42 configFiles]$ kubectl apply -f busyboxDeployment.yaml deployment.apps/net410-kops-busybox created [ec2-user@ip-172-31-21-42 configFiles]$ [ec2-user@ip-172-31-21-42 configFiles]$ [ec2-user@ip-172-31-21-42 configFiles]$ kubectl get deployment -o wide NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR net410-kops-busybox 2 2 2 2 59s net410-kops-busybox busybox app=net410-kops-busybox [ec2-user@ip-172-31-21-42 configFiles]$
Since the application is being created for the first time, activity uses: "kubectl -create" command instead of "kubectl -apply".
To edit/update running application one uses "kubectl apply"
[ec2-user@ip-172-31-21-42 kops-kubenet-demo]$ cd configFiles/ [ec2-user@ip-172-31-21-42 configFiles]$ ls busyboxDeployment.yaml serviceClusterIp.yaml serviceNodePort.yaml client.yaml serviceLoadBalancer.yaml simpleHttpServer.yaml [ec2-user@ip-172-31-21-42 configFiles]$ kubectl apply -f busyboxDeployment.yaml deployment.apps/net410-kops-busybox created [ec2-user@ip-172-31-21-42 configFiles]$ [ec2-user@ip-172-31-21-42 configFiles]$ [ec2-user@ip-172-31-21-42 configFiles]$ kubectl get deployment -o wide NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR net410-kops-busybox 2 2 2 2 59s net410-kops-busybox busybox app=net410-kops-busybox [ec2-user@ip-172-31-21-42 configFiles]$