All Projects → maguowei → Gotok8s

maguowei / Gotok8s

Licence: mit
Goto Kubernetes

Projects that are alternatives of or similar to Gotok8s

Allok8
⚡️A pretty swell Kubernetes visualization tool
Stars: ✭ 281 (-16.37%)
Mutual labels:  k8s
Kubekey
Provides a flexible, rapid and convenient way to install Kubernetes only, both Kubernetes and KubeSphere, and related cloud-native add-ons. It is also an efficient tool to scale and upgrade your cluster.
Stars: ✭ 288 (-14.29%)
Mutual labels:  k8s
Adapt
ReactJS for your infrastructure. Create and deploy full-stack apps to any infrastructure using the power of React.
Stars: ✭ 317 (-5.65%)
Mutual labels:  k8s
Rabbitmq Peer Discovery K8s
Kubernetes-based peer discovery mechanism for RabbitMQ
Stars: ✭ 283 (-15.77%)
Mutual labels:  k8s
Kube No Trouble
Easily check your cluster for use of deprecated APIs
Stars: ✭ 280 (-16.67%)
Mutual labels:  k8s
Ccat
Cloud Container Attack Tool (CCAT) is a tool for testing security of container environments.
Stars: ✭ 300 (-10.71%)
Mutual labels:  k8s
Kubewebhook
Go framework to create Kubernetes mutating and validating webhooks
Stars: ✭ 275 (-18.15%)
Mutual labels:  k8s
Kubeoperator
KubeOperator 是一个开源的轻量级 Kubernetes 发行版,专注于帮助企业规划、部署和运营生产级别的 K8s 集群。
Stars: ✭ 4,147 (+1134.23%)
Mutual labels:  k8s
Openshift Acme
ACME Controller for OpenShift and Kubernetes Cluster. (Supports e.g. Let's Encrypt)
Stars: ✭ 287 (-14.58%)
Mutual labels:  k8s
Ingressmonitorcontroller
A Kubernetes controller to watch ingresses and create liveness alerts for your apps/microservices in UptimeRobot, StatusCake, Pingdom, etc. – [✩Star] if you're using it!
Stars: ✭ 306 (-8.93%)
Mutual labels:  k8s
Kubo Deployment
Contains manifests used to deploy Cloud Foundry Container Runtime
Stars: ✭ 283 (-15.77%)
Mutual labels:  k8s
K3s
Lightweight Kubernetes
Stars: ✭ 18,646 (+5449.4%)
Mutual labels:  k8s
Kubernetes Ingress
NGINX and NGINX Plus Ingress Controllers for Kubernetes
Stars: ✭ 3,528 (+950%)
Mutual labels:  k8s
K8s Sidecar Injector
Kubernetes sidecar injection service
Stars: ✭ 280 (-16.67%)
Mutual labels:  k8s
Gb28181.solution
Linux/Win/Docker/kubernetes/Chart/Kustomize/GB28181/SIP/RTP/SDP/WebRTC/作为上下级域/平台级联互联
Stars: ✭ 323 (-3.87%)
Mutual labels:  k8s
Kubernetes Certified Administrator
Online resources that will help you prepare for taking the CNCF CKA 2020 "Kubernetes Certified Administrator" Certification exam. with time, This is not likely the comprehensive up to date list - please make a pull request if there something that should be added here.
Stars: ✭ 3,438 (+923.21%)
Mutual labels:  k8s
K8s For Docker Desktop
为Docker Desktop for Mac/Windows开启Kubernetes和Istio。
Stars: ✭ 3,863 (+1049.7%)
Mutual labels:  k8s
Mkit
MKIT is a Managed Kubernetes Inspection Tool that validates several common security-related configuration settings of managed Kubernetes cluster objects and the workloads/resources running inside the cluster.
Stars: ✭ 330 (-1.79%)
Mutual labels:  k8s
Admiral
Admiral provides automatic configuration generation, syncing and service discovery for multicluster Istio service mesh
Stars: ✭ 323 (-3.87%)
Mutual labels:  k8s
K3sup
bootstrap Kubernetes with k3s over SSH < 1 min 🚀
Stars: ✭ 4,012 (+1094.05%)
Mutual labels:  k8s

Goto Kubernetes

github workflow

安装 Kubernetes

对于 Mac 用户可以参考: k8s-docker-desktop-for-mac, 通过 Docker Desktop for Mac 开启和使用 Kubernetes

  1. 安装Docker
$ curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
  1. 安装 kubeadm, kubelet and kubectl

# root(sudo -i)

# Debian/Ubuntu
apt-get update && apt-get install -y apt-transport-https
curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl

# CentOS/RHEL/Fedora
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
setenforce 0
yum install -y kubelet kubeadm kubectl
  1. 使用 kubeadm 创建 Kubernetes 集群
# 确保关闭交换空间(running with swap on is not supported. Please disable swap)
$ sudo swapoff -a
# 永久关闭需要编辑 `/etc/fstab` 注释掉 `swap` 所在行

# 获取最新 Kubernetes 版本号
$ KUBERNETES_RELEASE_VERSION="$(curl -sSL https://dl.k8s.io/release/stable.txt)"

# 可以用下面的命令列出 kubeadm 需要的 images
$ kubeadm config images list --kubernetes-version=${KUBERNETES_RELEASE_VERSION}
# 提前拉取所需的镜像
$ kubeadm config images pull --config init.yml
# 集群初始化(init.yml文件中配置了使用阿里的镜像仓库)
$ sudo kubeadm init --config init.yml
# 或者执行(忽略Docker版本检查)
$ sudo kubeadm init --config init.yml --ignore-preflight-errors=SystemVerification

# KUBECONFIG 设置
$ mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config

# 使用 `flannel` 网络
$ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

# Master Isolation (if single-machine Kubernetes cluster )
$ kubectl taint nodes --all node-role.kubernetes.io/master-

Kubernetes Dashboard

部署 Kubernetes Dashboard

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended.yaml

# 开启本机访问代理
$ kubectl proxy

创建Dashboard管理员用户并用token登陆

# 创建 ServiceAccount kubernetes-dashboard-admin 并绑定集群管理员权限
$ kubectl apply -f https://raw.githubusercontent.com/gotok8s/gotok8s/master/dashboard-admin.yaml

# 获取登陆 token
$ kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep kubernetes-dashboard-admin | awk '{print $1}')

通过下面的连接访问 Dashboard: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

输入上一步获取的token, 验证并登陆。

Helm

安装

详细使用说明请参考 Helm官方文档

# Linux 用户
$ curl -s https://get.helm.sh/helm-v3.5.2-linux-amd64.tar.gz | tar xzv
$ sudo cp linux-amd64/helm /usr/local/bin
$ rm -rf linux-amd64

# Mac 用户
$ brew install helm

使用

# 使用 azure.cn 提供的 charts 镜像
$ helm repo add stable https://mirror.azure.cn/kubernetes/charts/
$ helm repo add incubator https://mirror.azure.cn/kubernetes/charts-incubator/

# 更新本地 charts repo
$ helm repo update

# 测试安装 redis chart
$ helm install my-redis stable/redis

# 删除 redis
$ helm uninstall my-redis

NGINX Ingress

# install by helm
$ helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
$ helm repo update

$ helm install ingress-nginx ingress-nginx/ingress-nginx

Istio

下载并安装 Istio

$ curl -L https://istio.io/downloadIstio | sh -
# 进入下载的文件夹,这里以 `istio-1.9.0` 为例
$ cd istio-1.9.0
$ export PATH=$PWD/bin:$PATH
# 安装
$ istioctl install --set profile=demo -y
# 设置自动注入 Envoy sidecar proxies
$ kubectl label namespace default istio-injection=enabled

部署示例

# 部署
$ kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
# 查看示例返回
$ kubectl exec -it $(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}') -c ratings -- curl productpage:9080/productpage | grep -o "<title>.*</title>"

升级 Kubernetes 版本

# 修改 `init.yml` 中 `kubernetesVersion` 版本号, 执行
sudo kubeadm upgrade apply --config init.yml --ignore-preflight-errors=SystemVerification
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].