one solution is restart kubelet in the original node and also the node with azure disk (`sudo systemctl restart kubelet`), and then after a few minutes, check the pod & volume status.
- PV & PVC accessModes
accessModes do not enforce access right, but rather act as labels to match a PV to a PVC. One PV could only be bound to one PVC, and one PVC (after bound to a PV) could be used by multiple pods
Redhat Openshift provides a good example for you to understand.
Different Access modes for mounted volume in init container and actual container
- PVC readOnly setting
At present, we allow two approaches to set PVC's ReadOnly attribute: specified by Pod.Spec.Volumes.PersistentVolumeClaim.ReadOnly, or specified by PersistentVolume.Spec.<PersistentVolumeSource>.ReadOnly, but when we try to get the ReadOnly attribute from volume.Spec for a PVC volume, we only consider volume.Spec.ReadOnly, which only comes from Pod.Spec.Volumes.PersistentVolumeClaim.ReadOnly, see AWS as an example.
details:
-
CSI: readOnly field is not passed to CSI NodePublish RPC call
-
namespace can not be deleted
Try the following steps:
- Get all the resources in the namespace and delete if they’re some resources:
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found -n $NAMESPACE
- Delete finalizers:
kubectl get namespaces $NAMESPACE -o json | jq '.spec.finalizers=[]' > /tmp/ns.json
kubectl proxy &
curl -k -H "Content-Type: application/json" -X PUT --data-binary @/tmp/ns.json http://127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
- Common Kubernetes Ports
- All Kubernetes Ports in code
- Feature Gates
- Kubelet parameters
- Debug Services
- Improving Kubernetes reliability: quicker detection of a Node down, Kubernetes recreate pod if node becomes offline timeout
- Increase maximum pods per node
- Kubernetes API Resources: Which Group and Version to Use
- Accessing Kubernetes Pods from Outside of the Cluster
- From Cloud Provider to CCM
- readOnly should respect values in both FlexVolume PV and PVC
- Volume Security
- Kubernetes: how to set VolumeMount user group and file permissions
- Allow volume ownership to be only set after fs formatting
- Best of 2019: Demystifying Persistent Storage Myths for Stateful Workloads in Kubernetes
- Kubernetes 1.23: Prevent PersistentVolume leaks when deleting out of order
- 深度解析 Kubernetes Local Persistent Volume
- Go Code Review Comments
- Go testing style guide
- Golang CommonMistakes
- arrays-and-slices
- sync
- goroutine
- Coding on Windows
- always use
filepath.Join
sincepath.Join
may not work on Windows
- always use
- Nil pointer check
- check
nil
ofptr
, or useto.String(ptr)
to replace*ptr
- check
- panic: assignment to entry in nil map
m := req.GetParameters()
m["a"] = "b" // if m is nil, then panic
- Using reference to loop iterator variable
func main() {
var outKey []*int
var outValue []*string
m := map[int]string{
1: "a",
2: "b",
3: "c",
}
for k, v := range m {
outKey = append(outKey, &k)
outValue = append(outValue, &v)
}
fmt.Println("Keys:", *outKey[0], *outKey[1], *outKey[2])
fmt.Println("Values:", *outValue[0], *outValue[1], *outValue[2])
}
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker rmi $(docker images -q) --force
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm install jupyterhub/jupyterhub --version 1.2.0 --generate-name