-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdeploy.sh
31 lines (22 loc) · 858 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
echo "Check ability to create a kubernetes deployment in ${NAMESPACE} using kubectl CLI"
kubectl auth can-i create deployment --namespace ${NAMESPACE}
kubectl config set-context --current --namespace=$NAMESPACE
# Execute the file
echo "KUBERNETES DEPLOYMENT COMMAND:"
echo "kubectl apply -f deployment.yaml" -n $NAMESPACE
kubectl apply -f deployment.yaml -n $NAMESPACE
echo "DEPLOYED PODS:"
kubectl get pods -n $NAMESPACE
# Execute the file
echo "KUBERNETES SERVICE COMMAND:"
echo "kubectl apply -f service.yaml" -n $NAMESPACE
kubectl apply -f service.yaml -n $NAMESPACE
echo "DEPLOYED SERVICES:"
kubectl get services -n $NAMESPACE
# Execute the file
echo "KUBERNETES INGRESS COMMAND:"
echo "kubectl apply -f ingress.yaml" -n $NAMESPACE
kubectl apply -f ingress.yaml -n $NAMESPACE
echo "DEPLOYED ingress:"
kubectl get ingress -n $NAMESPACE
echo ""