kubectl run -i --tty --rm debug -n kubeflex-system --image=postgres --restart=Never -- bash
psql -h mypsql-postgresql.kubeflex-system.svc -U postgres
This is useful when using a new image with same tag (not a best practice but may be useful for testing)
kubectl --context kind-kubeflex patch deployment kubeflex-controller-manager --namespace kubeflex-system --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/1/imagePullPolicy", "value": "Always"}]'
sleep 5
kubectl --context kind-kubeflex patch deployment kubeflex-controller-manager --namespace kubeflex-system --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/1/imagePullPolicy", "value": "IfNotPresent"}]'
helm upgrade --install kubeflex-operator chart --namespace kubeflex-system --set domain=localtest.me --set externalPort=9443
openssl x509 -noout -text -in certs/apiserver.crt
kubectl create configmap kubeflex-config -n kubeflex-system --from-literal=externalPort=9443 --from-literal=domain=localtest.me
NAMESPACE= # your namespace
NAME= # your secret name
kubectl get secrets -n ${NAMESPACE} ${NAME} -o jsonpath='{.data.apiserver\.crt}' | base64 -d
NAMESPACE= # your namespace
NAME= # pod name
CONTAINER= # container name
IMAGE=ubuntu:latest
kubectl debug -n ${NAMESPACE} -it ${NAME} --image=${IMAGE} --target=${CONTAINER} -- bash
# e.g. kubectl debug -n ${NAMESPACE} -it ${NAME} --image=curlimages/curl:8.1.2 --target=${CONTAINER} -- sh
cat /proc//cmdline | sed -e "s/\x00/ /g"; echo
docker containers. The address is the name of the docker container. For kubeflex that
address is kubeflex-control-plane. For example, if I have a nodeport service on
kubeflex-control-plane with port 30080 and I want to access it from another kind cluster
the internal address to use is https://kubeflex-control-plane:30080