Skip to content

Latest commit

 

History

History

notes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Common issues

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:

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

Links

Kubernetes network KB

Kubernetes storage KB

Service Mesh

Golang

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

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker rmi $(docker images -q) --force

jupyterhub

helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm install jupyterhub/jupyterhub --version 1.2.0 --generate-name

Cloud Native