kubeadm

ajuan 2020-06-25

  

kubeadm config images list --kubernetes-version=v1.11.1

kubeadm reset

kubectl get pods -n kube-system

kubectl get pods --all-namespaces

export KUBECONFIG=/etc/kubernetes/admin.conf

kubeadm config print init-defaults > kubeadm.conf

  • imageRepository: k8s.gcr.io                   ==> 
  • kubernetesVersion: v1.13.1                   ==>
  • kubeadm config images list --config kubeadm.conf
  • kubeadm config images pull --config kubeadm.conf
  • kubeadm init --config kubeadm.conf
  • kubeadm config print join-defaults
#!/bin/bash

K8S_VERSION=:v1.18.0
ETCD_VERSION=:3.4.3-0
DASHBOARD_VERSION=:v1.8.3
FLANNEL_VERSION=:v0.10.0-amd64
DNS_VERSION=:1.2.0
PAUSE_VERSION=:3.1

docker pull mirrorgooglecontainers/kube-apiserver-amd64$K8S_VERSION
docker pull mirrorgooglecontainers/kube-controller-manager-amd64$K8S_VERSION
docker pull mirrorgooglecontainers/kube-scheduler-amd64$K8S_VERSION
docker pull mirrorgooglecontainers/kube-proxy-amd64$K8S_VERSION
docker pull mirrorgooglecontainers/etcd-amd64$ETCD_VERSION
docker pull mirrorgooglecontainers/pause$PAUSE_VERSION
docker pull coredns/coredns$DNS_VERSION

docker pull quay.io/coreos/flannel$FLANNEL_VERSION

docker tag mirrorgooglecontainers/kube-apiserver-amd64$K8S_VERSION k8s.gcr.io/kube-apiserver$K8S_VERSION
docker tag mirrorgooglecontainers/kube-controller-manager-amd64$K8S_VERSION k8s.gcr.io/kube-controller-manager$K8S_VERSION
docker tag mirrorgooglecontainers/kube-scheduler-amd64$K8S_VERSION k8s.gcr.io/kube-scheduler$K8S_VERSION
docker tag mirrorgooglecontainers/kube-proxy-amd64$K8S_VERSION k8s.gcr.io/kube-proxy$K8S_VERSION
docker tag mirrorgooglecontainers/etcd-amd64$ETCD_VERSION k8s.gcr.io/etcd$ETCD_VERSION
docker tag mirrorgooglecontainers/pause$PAUSE_VERSION k8s.gcr.io/pause$PAUSE_VERSION
docker tag coredns/coredns$DNS_VERSION k8s.gcr.io/coredns$DNS_VERSION

docker image rm mirrorgooglecontainers/kube-apiserver-amd64$K8S_VERSION
docker image rm mirrorgooglecontainers/kube-controller-manager-amd64$K8S_VERSION
docker image rm mirrorgooglecontainers/kube-scheduler-amd64$K8S_VERSION
docker image rm mirrorgooglecontainers/kube-proxy-amd64$K8S_VERSION
docker image rm mirrorgooglecontainers/etcd-amd64$ETCD_VERSION
docker image rm mirrorgooglecontainers/pause$PAUSE_VERSION
docker image rm coredns/coredns$DNS_VERSION

相关推荐