This repository was archived by the owner on Jul 19, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 83
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
ksync doctor "Unable to contact the cluster for context " #440
Copy link
Copy link
Closed
Description
Hello.
For uses in k8s cluster we use clusterrole:
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: staging-user-role
rules:
- apiGroups: ["", "extensions", "apps", "batch", "autoscaling"]
resources: ["deployments", "deployments/scale", "replicasets", "pods", "pods/log", "pods/exec", "pods/portforward",
"nodes", "events", "configmaps", "persistentvolumes", "persistentvolumeclaims", "jobs", "cronjobs",
"replicationcontrollers", "statefulsets", "ingresses", "services", "daemonsets", "namespaces", "horizontalpodautoscalers"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"]
When we try to run ksync doctor we have an issue:
ksync doctor --context=staging
Extra Binaries ✓
Cluster Config ✓
Cluster Connection ✘
↳ Unable to contact the cluster for context (staging). Does 'kubectl --context=staging cluster-info' work?
If we try to run it works good:
kubectl --context=staging cluster-info
Kubernetes master is running at https://api.staging.domain.com
CoreDNS is running at https://api.staging.domain.com/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
If I run ksync doctor with admin permission, everything works fine:
ksync doctor
Extra Binaries ✓
Cluster Config ✓
Cluster Connection ✓
Cluster Version ✓
Cluster Permissions ✓
Cluster Service ✓
Service Health ✓
Service Version ✓
Docker Version ✓
Docker Storage Driver ✓
Docker Storage Root ✓
Watch Running ✓
Everything looks good! ☺
What could be wrong here? Thanks.
Metadata
Metadata
Assignees
Labels
No labels