Testing whether kubectl/oc context is valid

7 views
Skip to first unread message

Andrew Feller

unread,
Sep 6, 2019, 7:37:05 AM9/6/19
to ansible...@googlegroups.com
Does anyone have a novel way to test kubectl/oc login context explicitly in a playbook to fail instead of waiting to lower in roles?

I'm familiar with k8s_auth module for handling explicit Kubernetes/OpenShift login, however there are still cases where we need to fallback on kubectl/oc context when using k8s module and k8s lookup plugin and having a reasonable way of testing connectivity would save a lot of time..

Thanks,
Andy
--

BandwidthMaroon.png


Andy Feller    Sr DevOps Engineer

900 Main Campus Drive, Suite 500, Raleigh, NC 27606



e: afe...@bandwidth.com

Reply all
Reply to author
Forward
0 new messages