K8s
-
Https (k8s ingress TLS) "default backend 404" error
-
Ans: tls secret not correct, TLS not
-
Create TLS secret by file: .crt .key (Letsencrypt)
kubectl -n XX create secret tls tls-XXX \
--cert=signed.crt \
--key=domain.key
-
Create an base64 string for k8s Secret Opaque
echo -n 'password' | base64
# Or Notepad++ => MINE tool > Base64 Encode with Unix EOL
<--- sample file
apiVersion: v1
kind: Secret
metadata:
name: your-secrets
type: Opaque
data:
root-password: XXXXXXX
-
Clean key by patch
$ kubectl patch configmap myconfigmap --type=json -p='[{"op": "remove", "path": "/data/mykey"}]'
-
Rollback version
# List old
kubectl rollout history deployment/app
# Rollback to
kubectl rollout undo deployment/app --to-revision=2
-
Release pv to be avaliable again
kubectl edit pv PV_NAME
# Remove spec.claimRef
kubectl patch pv {{PV_NAME}} --type=json -p='[{"op": "remove", "path": "/spec/claimRef"}]'
-
Search and get pod name
kubectl get pods -l app=my-app -o custom-columns=:metadata.name
-
kubectl Copy file into pod: error directory not exists or not found.
kubectl --kubeconfig=xxx cp {{filename}} {{namespace}}/{{pod}}:/{{filename}}
# {{filename}} is needed!!
-
CronJob sample
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: jj-triggerjob
namespace: pls-po
spec:
schedule: "* 6 * * *"
jobTemplate:
spec:
backoffLimit: 4
template:
spec:
containers:
- name: jj-triggerjob
image: dockerhub/repo:latest
resources:
limits:
cpu: 400m
memory: 512Mi
requests:
cpu: 400m
memory: 512Mi
args:
- /bin/sh
- -c
- " echo \"Running trigger job\";
exit_status=$(curl -X PUT jjgoodapi/api/v1/person -H \"accept: application/octet-stream\" -H \"my-trace-id: $(uuidgen)\" -H \"my-application-name: biapi-triggerjob\" -H \"my-api-key: XXXXX\" -i -d \" \" -w \"%{http_code}\");
if ! echo $exit_status | grep -e \"202\" -e \"406\" ; then
echo $exit_status;
echo \"Failed without status code: 202 or 406\";
echo \"Done trigger job\";
exit 1;
fi;
echo \"Passed with status code: 202 or 406\";
echo \"Done trigger job\";
"
# imagepullsecrets:
# - name: XXAccount
restartPolicy: OnFailure
nodeSelector:
beta.kubernetes.io/os: linux
-
Unknown object type "nil"
-
error msg
error: error validating "/home/jj/deployment.yaml": error validating data: [ValidationError(Ingress.spec.tls[0].hosts): unknown object type "nil" in Ingress.spec.tls[0].hosts[0],
-
Solve: Fix wrong yaml format.
-
Apply private registry credential
kubectl create secret generic regcred \
--from-file=.dockerconfigjson={path/to/.docker/config.json} \
--type=kubernetes.io/dockerconfigjson
# Add to deployment (pod)
spec:
containers:
- name: xxx
image: xxx
imagePullSecrets:
- name: regcred
-
Deployment not updating after image updated, Force deployment rolling-update
spec:
template:
spec:
containers:
- image: xxx
imagePullPolicy: Always
-
Deployment not updating after configmap updated
-
Update label to trigger deployment rolling update
metadata:
labels:
configmap-version: 1
-
ConfigMap has a size limit of 1Mb, exceed error:
-
Msg: The ConfigMap "XXXXXXX" is invalid: metadata.annotations: Too long: must have at most 262144 characters
-
Use kubectl replace
-
Ref: https://github.com/coreos/prometheus-operator/issues/535#issuecomment-319936366
K8s dashboard
-
Paste string to EXEC UI
-
ctrl-shift-v
-
Login issue: namespace change to default
-
Solution: type it back at uri
-
Login issue: exec into pod via Firefox will redirect back to k8s portal.
-
Sol: Use other browsers.
DockerHub
-
Always get handshake fail when `docker pull`
-
Solution:
Login DockerHub with the account which has no email address.
-
Download image fail: Authentication fail 401
-
Message:
(HTTP code 401) unexpected – {"message":"Get https://registry-1.docker.io/v2/library/jenkins/manifests/2.46.3: unauthorized: incorrect username or password"}
Solution:
logging into Kitematic with your username instead of email.
-
Check the files permission in docker image
docker run –rm -ti –entrypoint sh jj/docker-stacks -c "ls -alF /usr/local/bin/"
Docker
-
Docker with GrayLog
---------------------------------- docker
docker run --log-driver=gelf --log-opt gelf-address=udp://graylog.example.com:12201 busybox echo This is my message.
------------------------- docker-compose
version: "2"
services:
example:
container_name: example
image: debian:wheezy
command: /bin/sh -c "while true; do date && echo "hello"; sleep 1; done"
ports:
- "1234:1234"
logging:
driver: "gelf"
options:
gelf-address: "udp://graylog.example.com:12201"
tag: "first-logs"
Unable to start container by docker-compose
-
Msg: "UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)"
-
Ans: ` sudo service docker restart`
[Character in Dockerfile]: " will be split by space
in echo " xxx string " > file.txt
# result: file.txt
# xxx
# string
-
[Character in Dockerfile]: " will be remove inside ' "xxx" '
echo ' "xxx string" ' > file.txt
# result: file.txt
# xxx string
-
[Cronjob] – Clean container&image daily at mid-night
# Clean container
0 0 * * * docker rm -f $(docker ps -aq)
# Clean image without baseImage
0 5 * * * docker image prune -f; docker rmi -f $(docker images | awk '/^[^m][^c][^r]*/{ print $3 }')
0 5 * * * docker rmi -f $(docker images | awk '$1 !~/ik8s/{ print $3 }')
0 5 * * * docker image prune -f --filter="dangling=true"; docker image prune -f --all --filter until=168h
# Clean all unused build cache
docker builder prune -a
# Clean all
docker system prune -a
# Clean image older than 48h
docker image prune -f --all --filter until=48h
# Clean dangling images
docker rmi $(sudo docker images -f "dangling=true" -q)
-
Not enough memory to start Docker on Windows
-
Modify `C:\Program Files\Docker\Docker\resources\MobyLinux.ps1` and change `$Memory = 512` MB as you want
-
Install with `sudo` but `docker run` without it, got error: "docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create: dial unix /var/run/docker.sock: connect: permission denied.See 'docker run –help'.".
sudo groupadd docker
sudo usermod -aG docker $USER # Add user into group
Ref: https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user
-
ERROR: Get https://registry-1.docker.io/v2/: remote error: tls: handshake failure
docker login # Yes, login first
-
Windows 10: Change docker images and any stuff to another folder, notice that the slash and case of character.
-- C:\ProgramData\docker\config\daemon.json --
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": true,
"experimental": false,
"graph":"D:\\ProgramData\\docker"
}
-
docker: Error response from daemon: driver failed programming external connectivity on endpoint
-
Restart docker
-
The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request.
-
mkdir /host_mnt/c: file exists.
-
Re-apply Shared Drive in docker-Desktop.
Docker compose
-
Docker IP not match
# Check docker container IP
docker network inspect XXX
# Rebuild network (restart not working)
docker-compose down
docker-compose up
PS. docker-compose restart <- won't rebuild
-
ERROR: client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
--- docker-compose.yml ---
version: '2.1'
...
Cialis Generico Inghilterra
tadalafil online sales
Buy Clavamox For Cats Online
Where Can I Buy Cyproheptadine
Cialis Homme
Site Fiable Pour Achat Kamagra
cialis online no prescription
hydroxychloroquine over the counter walgreens
Miglior Sito Per Acquisto Cialis
cialis australia
Pastillas Cialis Yahoo
how does gabapentin work
propecia timeline
buy zithromax usa
Priligy Costo En Venezuela
diolispowl retina https://alevitrasp.com Doxycycline From Canada
PiРів„– Cialis Kamagra Coarty http://www.alevitrasp.com
over the counter prednisone at walmart Qzsegb ou acheter du viagra forum
order cialis 20mg sale – cialis buy online buy cialis 10mg online cheap
cialis without prescription – cialis for men over 50 brand tadalafil 40mg
plaquenil online – cost hydroxychloroquine 200mg hydroxychloroquine 400mg without prescription
stromectol for humans – ivermectin for humans for sale ivermectin 3mg online
order fildena online – buy disulfiram pills antabuse 250mg pill
stromectol drug – cost of ivermectin lotion ivermectin australia
clomid 100mg brand – order clomid 50mg pill cetirizine for sale online
purchase desloratadine generic – buy aristocort 10mg without prescription buy aristocort 10mg online
misoprostol pills – order misoprostol 200mcg generic oral levothyroxine
oral viagra 50mg – sildenafil online generic neurontin 800mg
buy cialis – buy cialis 20mg online cheap cenforce 50mg canada
buy diltiazem sale – order generic zyloprim 300mg zovirax 400mg cost
hydroxyzine 25mg pill – atarax 25mg drug buy rosuvastatin generic
cheap ezetimibe – ezetimibe 10mg ca order generic citalopram 20mg
indian cialis tadalafil tadalafil onset
sildenafil coupon walmart how to get sildenafil
stromectol ebay stromectol xr
ivermectin gel ivermectin 6 tablet
ivermectin pill cost ivermectin 0.1 uk
ivermectin oral solution ivermectin 500mg
buy ivermectin cream stromectol 3 mg tablet
best viagra sites online – buy viagra 100mg generic sildenafil price
ivermectin 10 ml ivermectin syrup
ivermectin 0.5% brand name stromectol oral
ivermectin 0.5% lotion buy stromectol canada
nexium 40mg canada – cost nexium 20mg phenergan pills
ivermectin 4000 mcg stromectol where to buy
ivermectin 1 cream 45gm ivermectin lotion
ivermectin 5ml purchase oral ivermectin
tadalafil uk – goodrx cialis cialis 40mg ca
stromectol generic name buy ivermectin canada
oral provigil – most reliable online pharmacy cheap erectile dysfunction
isotretinoin 10mg cost – order zithromax online azithromycin 250mg uk
sildenafil and tadalafil cialis once a day
brand viagra how to use sildenafil citrate tablets
cialis medicare when to take cialis
brand furosemide 100mg – order doxycycline 100mg generic viagra buy online
price of ivermectin tablets stromectol tablets 3 mg
order cialis 20mg sale – cialis 20mg canada order sildenafil 50mg
ivermectin 1%cream ivermectin 24 mg
tadalafil uk – warfarin sale brand warfarin 2mg
buy avodart without prescription – dutasteride over the counter usa pharmacy cialis
generic viagra buy viagra no prescription
purchase viagra generic – order sildenafil 50mg generic cialis mail order us
buy sildenafil us is sildenafil sold over the counter?
sildenafil 20 mg uses sildenafil citrate tablets
viagra prescription best generic viagra
best pills for ed – erectile dysfunction medications brand prednisone 10mg
cost of prescription drugs in us vs other countries pharmacy store design layout
buy generic viagra online europe buy generic viagra online australia
tadalafil indian brands cheap tadalafil online
isotretinoin 10mg price – buy accutane pills buy amoxicillin 250mg online cheap
accredited online pharmacy technician programs northern pharmacy canada
cialis free 30 day supply köpä cialis
suboxone canada pharmacy ordering prescriptions from canada legally
discounts on levitra viagra cialis levitra
doxycycline 200mg sale – chloroquine over the counter aralen price
buy viagra new zealand sildenafil generic drug cost
walmart pharmacy rx pharmacy richland
buy viagra fast shipping price viagra 100mg
ivermectin for rabbits mites ivermectin pour on for ringworm in cattle
cialis stores pay cialis with pay pal
solutions rx pharmacy canadian pharmacy sildenafil
tadalafil blood pressure how to make tadalafil
ivermectin for head lice chicken lice treatment ivermectin
pharmacy supply store near me canadian pharmacy viagra generic
levitra patent expiration viagra cialis levitra online
buy generic viagra 100mg online viagra tablets for men
cost cialis 10mg – Best price for generic cialis viagra sildenafil 150mg
buy cialis 365 pills cialis price walgreens
brand modafinil 100mg – modafinil without prescription viagra for men
narcotics online pharmacy Zoloft
international online pharmacy live pharmacy continuing education online
cvs pharmacy application online for employment reliable canadian pharmacies
south bronx rx pharmacy canadian pharmacies drug prices
order accutane 10mg without prescription – celecoxib 100mg oral brand celebrex 100mg
street value of prescription drugs is it legal to buy prescription drugs in canada
generic tamsulosin 0.4mg – buy aldactone 100mg online cheap buy aldactone 25mg for sale
buy zocor 10mg – academic writing service write me a essay
online slots for real money – term papers writing buying an essay
online slots – ampicillin 250mg ca buy ampicillin 250mg online cheap
ciprofloxacin 1000mg uk – ciprofloxacin ca tadalafil 20mg price
sildenafil 50mg canada – buy viagra sale buy real vardenafil online
top online pharmacy medicine store pharmacy
order augmentin 1000mg – buy tadalafil online tadalafil buy online
health partners online pharmacy pharmacy tech class online
order generic bactrim 960mg – sildenafil 20mg buy sildenafil online
order cephalexin 500mg for sale – erythromycin 500mg drug erythromycin 250mg drug
order generic sildenafil – ivermectin 12 mg tablet generic stromectol online
budesonide allergy nasal spray – buy cialis 5mg without prescription antabuse order online
ceftin 500mg us – methocarbamol 500mg brand tadalafil 20mg price
online pharmacy canada pharmacy bachelor degree online
acillin brand – order ampicillin 250mg online tadalafil 5mg oral
buy amoxicillin 500mg pills – buy azithromycin online buy vardenafil 20mg pill
cheap doxycycline 100mg – order doxycycline pills cialis from canada
tadalafil drug – cialis online buy order provigil 100mg sale
order prednisolone 10mg pill – order gabapentin 600mg generic cheap sildenafil generic
avs3y
0i73e
72bi
lasix pill – ivermectin 12 mg tablets for humans ivermectin 50 mg
hydroxychloroquine 200mg brand – purchase baricitinib generic baricitinib medication
q5107
jzm00
yxld
buy glucophage 1000mg online cheap – order glucophage 1000mg order generic amlodipine 5mg
buy lisinopril 2.5mg pills – order tenormin generic atenolol oral
levitra 20mg tablet – clomid 50mg pills order clomiphene
ventolin 4mg pills – buy dissertation online order priligy 90mg for sale
oral synthroid 75mcg – levothyroxine order online plaquenil 200mg canada
dapoxetine что это dapoxetine pills online cheap priligy on amazon how much does priligy cost america
plaquenil hydroxychloroquine 200mg where to buy
dapoxetine in pakistan priligy pills canada priligy for premature ejaculation how do.you know if dapoxetine has started work8ng
buy cialis canada – sildenafil 50 mg order viagra pill
buy viagra melbourne buy generic cialis australia how to use cialis for best results how often can i take cialis 20mg
viagra for men viagra online australia review if a woman takes viagra when to take cialis
cenforce buy online – motilium 10mg for sale motilium uk
neurontin 400 neurontin 100 mg topamax pristiq neurontin mobic restoril and zanaflex what is the maximum dose of gabapentin per day
ventolin inhaler dose ventolin pharmacy australia does albuterol increased heart rate what medicare advantage plan covers ventolin hfa
buy sildenafil 50mg pills – viagra mail order us tadalafil 20mg price
buy provigil 100mg – male ed pills rhinocort cheap
wirkung von kamagra kamagra jellies kamagra 100mg how to use where can i get kamagra in the uk
diltiazem nursing considerations purchase diltiazem generic diltiazem evaluation of medication effectiveness how long does diltiazem xr stay in the body?
order isotretinoin 40mg online cheap – buy generic isotretinoin 40mg tetracycline 250mg for sale
sex viagra tablets low price viagra where to buy viagra online australia how long does viagra take to kick in
generic propecia propecia online prescription best place to buy generic propecia what happens if i miss a day of propecia
buy flexeril 15mg generic – ketorolac ca order inderal 20mg
cialis ou viagra cialis 40 mg prix du cialis en pharmacie cialis 5mg ou 10mg
cialis jelly cialis without a doctor prescription usa where can you buy genuine viagra online how to enhance viagra
clopidogrel buy online – purchase metoclopramide reglan 10mg us
buy generic cozaar 50mg – losartan 50mg for sale phenergan for sale
cialis price drop how to get a cialis prescription online can you buy viagra online legally levitra where to buy
levaquin pills – viagra 25mg price cheap cialis 5mg
clomid or letrozole clomid pharmacy prices clomid for male infertility success stories how does clomid work to get pregnant
avis cialis generique cialis amazon prix cialis 20mg en pharmacie lafayette viagra cialis ou autre
cialis cost – order celebrex 100mg pills tamsulosin 0.2mg usa
baclofen and methadone lioresal 5 mg can baclofen and motrin be taken together what is another name for baclofen
baclofen name brand baclofen over the counter canada can you take baclofen and meloxicam together what strengths does baclofen come in
ondansetron 4mg over the counter – buy zocor 10mg pills valacyclovir 500mg cost
finasteride order – ampicillin cost buy generic cipro
seroquel narcotic seroquel 400 seroquel how does it work how long does seroquel make you sleep
diflucan tablet dosage cheap diflucan diflucan otc where to buy how long after drinking coffee with creamer can i take my diflucan
metronidazole 200mg for sale – order metronidazole pill cephalexin 125mg oral
cost ondansetron 8mg propecia 1mg price