我是K8S和Terraform的新手。我在运行在裸金属上的ingress_nginx集群上安装了K8S。
[root@control02 ~]# kubectl get svc -n ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
docker-hello-world-svc NodePort 10.xx.xx.121 <non
我成功地创建并部署了一个带有minikube的k8s集群,使用以下配置运行了一个简单的hello-world node.js应用程序的4个副本。
应用程序的Dockerfile:
FROM ubuntu:latest
RUN apt-get update
RUN apt-get -qq update
RUN apt-get install -y nodejs npm
# TODO could uninstall some build dependencies
# debian installs `node` as `nodejs`
RUN update-alternatives --ins
我有一个应用程序在多个K8s集群中运行;假设有一个前端服务和两个后端服务。
我使用NGINX代理从前端到后端服务的请求。普通NGINX版,而不是 NGINX+。下面是nginx.conf:
server {
....
set $back1 "<k8s hostname for the backend1 service>";
set $back2 "<k8s hostname for the backend2 service>";
location /back1 {
rewrite ^/ba
我在created工作站(kubeadm)上创建了一个k8s集群,现在在网络策略实验室上试用。
这是我的代码:
# create new ns
kubectl create ns demo
# run new nginx pod
kubectl run nginx -n demo --image nginx
# expose pod by clusterIP
kubectl expose po nginx --port=80 -n demo
# run busybox to connect to nginx pod
kubectl run busybo
我已经使用helm chart创建了k8s集群,并启用了入口。我想使用azure解析具有特定名称的群集IP。 Please find the below scenerios for cluster :
1. k8s clsuter name: deb-aks
2. k8s dns prefix : dev-aks-dns
3. Ingress enabled using helm chart.
4. Cluster IP : 13.72.186.11
5. I would like to change the IP address i.e. mentioned above to som
我有两个小的k8s集群(一个有法兰绒,一个有棉布)。
安装这两个k8s集群的具体步骤是在安装时选择Pod网络(一个使用法兰绒,另一个使用棉布)。
的问题是"kubectl“命令在两个集群上有不同的响应时间。用棉布在k8s上反应大约需要一分钟,而用法兰绒的k8s则会立即做出反应。
确信,这个问题并不是由于Pod网络选择,,因为在两个集群上没有旋转豆荚等问题,这两个集群都是按照预期工作的。
时间对法兰绒基k8s 0m0.167s的影响
$ time kubectl get all
NAME READY STATUS RESTARTS
我创建了一个由一个主节点和三个工作节点组成的k8s集群。(主节点可以扮演主和从属角色)。一切都很好。我可以部署pod,exec pod,获取日志...但是我有一些日志问题。我无法从工作节点获取日志。我只能从主节点kubeclt logs <pod-name>获取日志 这是我的错误消息: error: You must be logged in to the server (the server has asked for the client to provide credentials ( pods/log nginx)) 它仅出现在工作节点计划pod中。帮帮我..。