Minikube

k8s学习

一曲冷凌霜 提交于 2021-01-11 15:10:10
https://ke.qq.com/course/366778?taid=2773354872674490 1、minukub (https://kubernetes.io/docs/tutorials/hello-minikube/)   使用minikube把东西发布出去     minikube service hello-node   mini配置     minikube addons list     minikube addons enable heapster   2、kubectl:   pod:     就是一堆container   deployment:     用来检查pod的健康性      kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node   expose:     把k8s里面的deployment发布出去, 这个是minikube的内网      kubectl expose deployment hello-node --type=LoadBalancer --port= 8080   config:     kubectl config view   get:     kubectl get deployments

Minikube issue on Windows 10 Home Edition

折月煮酒 提交于 2021-01-07 07:58:47
问题 I'm trying to install Minikube on Windows 10 Home. I don't have Hyper-V but i understand i can still use Minikube to as a remote Docker daemon as well as local Kubernetes cluster. Minikube Chocolatey I appreciate the assistance please. When i tried starting minikube i get the following error: So what am i doing wrong? 回答1: Since Windows 10 Home Edition doesnt support Hyper V, you might want use VirtualBox instead. Follow Getting Start with Kubernetes in Windows 10 with Minikube and kubectl In

docker & kubernetes 环境搭建

北城余情 提交于 2021-01-06 20:55:59
此文环境为阿里云服务器(使用了部分阿里镜像加速) 安装Docker(ubuntu 16.4) # step 1: 安装必要的一些系统工具 sudo apt-get update && apt-get -y install apt-transport-https ca-certificates curl software-properties-common # step 2: 安装GPG证书 curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - # Step 3: 写入软件源信息 sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" # Step 4: 更新并安装Docker-CE sudo apt-get -y update && apt-get -y install docker-ce # 安装指定版本的Docker-CE: # Step 1: 查找Docker-CE的版本: # apt-cache madison docker-ce # docker-ce | 17.03.1~ce-0

Kubernetes 环境搭建

浪尽此生 提交于 2021-01-05 10:27:50
入坑第一天,差点没爬起来😂😂😂 1. Kubernetes是什么 Kubernetes (K8s) 是一个用于 自动化部署 、 自动扩缩容 和 管理容器化应用程序 的开源系统。 关于Kubernetes,说得最多的就是 自动容器部署 、 弹性伸缩 、 应用管理 。 (Automated container deployment , scaling , and management) Kubernetes将组成应用程序的容器分组为逻辑单元,以便于管理和发现。Kubernetes基于在谷歌上运行生产工作负载的15年经验,结合了来自社区的最佳思想和实践。是工业生产级别的容器编排系统。 2. Kubernetes特性 服务发现和负载均衡 不需要修改应用程序来使用不熟悉的服务发现机制。Kubernetes为Pods提供它们自己的IP地址和一组Pods的单个DNS名称,并且可以在它们之间实现负载平衡。 自动打包 在不牺牲可用性的情况下,根据容器的资源需求和其他约束条件自动放置容器。混合关键工作负载和最佳工作负载,以提高利用率并节省更多资源 自动修复 重新启动失败的容器,在节点死亡时替换和重新调度容器,杀死那些不响应用户定义的健康检查的容器,并且在它们准备好提供服务之前不会向客户端通知它们。 自动向前滚动和回滚 Kubernetes会逐步放开对应用程序或其配置的更改,同时监视应用程序的运行状况

K8s service not pingable

别等时光非礼了梦想. 提交于 2021-01-04 06:42:12
问题 I have a k8s service/deployment in a minikube cluster (name amq in default namespace: D20181472:argo-k8s gms$ kubectl get svc --all-namespaces NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE argo argo-ui ClusterIP 10.97.242.57 <none> 80/TCP 5h19m default amq LoadBalancer 10.102.205.126 <pending> 61616:32514/TCP 4m4s default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 5h23m kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP 5h23m I spun up infoblox/dnstools, and tried

使用Minikube运行一个本地单节点Kubernetes集群(阿里云)

两盒软妹~` 提交于 2020-12-24 03:10:48
  使用Minikube运行一个本地单节点Kubernetes集群 中使用谷歌官方镜像由于某些原因导致镜像拉取失败以及很多人并没有代理无法开展相关实验。   因此本文使用阿里云提供的修改版Minikube创建一个单节点的Kubernetes集群。   阿里云教程地址: https://yq.aliyun.com/articles/221687 ⒈下载Minikube curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.2.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ ⒉启动 cd /usr/local/ bin minikube start --docker-env HTTPS_PROXY=${https://registry.docker-cn.com} --registry-mirror=https://registry-mirror.com --vm-driver=none      ⒊打开Kubernetes控制台 minikube dashboard      来源: oschina 链接: https://my.oschina.net/u

Kubernetes - How to define ConfigMap built using a file in a yaml?

给你一囗甜甜゛ 提交于 2020-12-21 14:28:29
问题 At present I am creating a configmap from the file config.json by executing: kubectl create configmap jksconfig --from-file=config.json I would want the ConfigMap to be created as part of the deployment and tried to do this: apiVersion: v1 kind: ConfigMap metadata: name: jksconfig data: config.json: |- {{ .Files.Get "config.json" | indent 4 }} But doesn't seem to work. What should be going into configmap.yaml so that the same configmap is created? ---UPDATE--- when I do a helm install dry run

Kubernetes - How to define ConfigMap built using a file in a yaml?

自古美人都是妖i 提交于 2020-12-21 14:28:25
问题 At present I am creating a configmap from the file config.json by executing: kubectl create configmap jksconfig --from-file=config.json I would want the ConfigMap to be created as part of the deployment and tried to do this: apiVersion: v1 kind: ConfigMap metadata: name: jksconfig data: config.json: |- {{ .Files.Get "config.json" | indent 4 }} But doesn't seem to work. What should be going into configmap.yaml so that the same configmap is created? ---UPDATE--- when I do a helm install dry run

Load distribution: All HTTP requests are getting redirected to a single pod in a k8 cluster

荒凉一梦 提交于 2020-12-15 06:40:14
问题 I have created a very simple spring boot application with only one REST service. This app is converted into a docker image ("springdockerimage:1") and deployed in the Kubernetes cluster with 3 replicas. Contents of my "Deployment" definition is as follows: apiVersion: apps/v1 kind: Deployment metadata: name: springapp labels: app: distributiondemo spec: selector: matchLabels: app: distributiondemo replicas: 3 template: metadata: labels: app: distributiondemo spec: containers: - name: spring

Deployment pod cannot connect ClusterIP service

白昼怎懂夜的黑 提交于 2020-12-13 04:52:12
问题 I try to expose my server IP by using Ingress. The server is an Express.js app. It listens at http://localhost:5000 locally when without docker. Here are my Kubernetes config files: server-deployment.yaml apiVersion: v1 apiVersion: apps/v1 kind: Deployment metadata: name: server-deployment spec: replicas: 1 selector: matchLabels: component: server template: metadata: labels: component: server spec: containers: - name: server image: hongbomiao/hongbomiao-server:latest ports: - containerPort: