Merge "Move kubectl calls to KRM toolbox pt.7"

This commit is contained in:
Zuul 2021-05-26 04:03:54 +00:00 committed by Gerrit Code Review
commit d76e9dba0e
1 changed files with 8 additions and 15 deletions

View File

@ -14,24 +14,17 @@
set -ex
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
echo "Create target k8s cluster resources"
airshipctl phase run controlplane-target --debug
echo "List all nodes in target cluster"
kubectl \
--kubeconfig $KUBECONFIG \
--context $KUBECONFIG_TARGET_CONTEXT \
--request-timeout 10s \
get node
# Scripts for this phase placed in manifests/function/phase-helpers/wait_node/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-node
airshipctl phase run kubectl-get-node-target --debug
echo "List all pods in target cluster"
kubectl \
--kubeconfig $KUBECONFIG \
--context $KUBECONFIG_TARGET_CONTEXT \
--request-timeout 10s \
get pods \
--all-namespaces
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
airshipctl phase run kubectl-get-pods-target --debug