Skip to content

Commit 710e776

Browse files
dhananjay-ngYashwantGohokar
authored andcommitted
use readyz api for apiserver reachability
1 parent 467f52f commit 710e776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/csi-util/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func (u *Util) WaitForKubeApiServerToBeReachableWithContext(ctx context.Context,
160160
func(waitForKubeApiServerCtx context.Context) (bool, error) {
161161
attemptCtx, attemptCancel := context.WithTimeout(waitForKubeApiServerCtx, backoff.Step())
162162
defer attemptCancel()
163-
_, err := k.CoreV1().RESTClient().Get().AbsPath("/version").Do(attemptCtx).Raw()
163+
_, err := k.CoreV1().RESTClient().Get().AbsPath("/readyz").Do(attemptCtx).Raw()
164164
if err != nil {
165165
u.Logger.With(zap.Error(err)).Errorf("Waiting for kube api server to be reachable, Retrying..")
166166
return false, nil

0 commit comments

Comments
 (0)