windows 修改host
文件路径: C:\Windows\System32\drivers\etc
deployment
kubectl create deployment deploy-nginx--image=docker.io/library/nginx:latest -n test
kubectl get deploy -n test
kubectl delete deploy deploy-nginx -n test
2022年1月5日大约 4 分钟
文件路径: C:\Windows\System32\drivers\etc
kubectl create deployment deploy-nginx--image=docker.io/library/nginx:latest -n test
kubectl get deploy -n test
kubectl delete deploy deploy-nginx -n test
<String>
<[]String>
<Object>
<[]Object>
kubectl explain pod.spec.containers
kubectl create --help
kubectl create deployment web666 --image=nginx --replicas=3 -n test --dry-run=client -o yaml
server {
listen 80;
server_name example.com;
# 根目录
root /var/www/example.com;
# 索引文件
index index.html index.php;
# SSL 证书
ssl_certificate /path/to/certificate.crt;
ssl_certificate_key /path/to/certificate.key;
# HTTP 标头安全(HSTS)
add_header Strict-Transport-Security "max-age=31536000";
# 缓存
location /static {
expires 30d;
}
# Gzip 压缩
gzip on;
gzip_types text/plain text/css text/javascript application/javascript application/x-javascript;
# keepalive 连接
keepalive_timeout 65;
# FastCGI 配置
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# 错误页面
error_page 404 /404.html;
error_page 500 /500.html;
# 日志记录
access_log /var/log/nginx/example.com-access.log;
error_log /var/log/nginx/example.com-error.log;
}
apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
apt -y install docker-ce docker-ce-cli containerd.io
systemctl status docker
apt-mark hold docker-ce
docker container run hello-world
apt -y install docker-compose
apt-mark hold docker-compose
docker version
docker-compose version
ssh-keygen -t rsa -P ''