Skip to content
Snippets Groups Projects
Unverified Commit ddd200bb authored by Andreas Krüger's avatar Andreas Krüger Committed by GitHub
Browse files

Merge pull request #2604 from shravanpn7/shravan-pr

kubectl get pods from 'test' namespace as the pods were created in test ns
parents 9707aa80 f26e16bf
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
- name: Wait for pods to be ready - name: Wait for pods to be ready
shell: "{{bin_dir}}/kubectl get pods" shell: "{{bin_dir}}/kubectl get pods -n test"
register: pods register: pods
until: until:
- '"ContainerCreating" not in pods.stdout' - '"ContainerCreating" not in pods.stdout'
...@@ -25,18 +25,18 @@ ...@@ -25,18 +25,18 @@
no_log: true no_log: true
- name: Get pod names - name: Get pod names
shell: "{{bin_dir}}/kubectl get pods -o json" shell: "{{bin_dir}}/kubectl get pods -n test -o json"
register: pods register: pods
no_log: true no_log: true
- name: Get hostnet pods - name: Get hostnet pods
command: "{{bin_dir}}/kubectl get pods -o command: "{{bin_dir}}/kubectl get pods -n test -o
jsonpath='{range .items[?(.spec.hostNetwork)]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'" jsonpath='{range .items[?(.spec.hostNetwork)]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"
register: hostnet_pods register: hostnet_pods
no_log: true no_log: true
- name: Get running pods - name: Get running pods
command: "{{bin_dir}}/kubectl get pods -o command: "{{bin_dir}}/kubectl get pods -n test -o
jsonpath='{range .items[?(.status.phase==\"Running\")]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'" jsonpath='{range .items[?(.status.phase==\"Running\")]}{.metadata.name} {.status.podIP} {.status.containerStatuses} {end}'"
register: running_pods register: running_pods
no_log: true no_log: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment