アリクラウドのECSの下でk 8 sをインストールします

1629 ワード

手動でecsにk 8 sをインストールする全過程は、度娘が探した資料に基づいて以下のように整理されている.
1.yum install -y etcd kubernetes 2.vim/etc/sysconfig/docker#の内容は、OPTIONS='--selinux-enabled=false--insecure-registry gcrに変更する.io' 3.vim/etc/kubernetes/apiserver削除–admission-controlのServiceAccount
4.systemctl start etcd.service 5.systemctl start docker 6.systemctl start kube-apiserver.service 7.systemctl start kube-controller-manager.service 8.systemctl start kube-scheduler.service 9.systemctl start kubelet.service 10.systemctl start kube-proxy.service
11.yum install python-rhsm-certificates 
k 8 sダウンロードミラーエラーを回避
12.  wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm     
13.chmod +x python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm 
14.   rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout /etc/rhsm/ca/redhat-uep.pem | tee           /etc/rhsm/ca/redhat-uep.pem
15.   ll /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt     

16.docker pull XXXX 17.yamlファイルの作成:
XXXX.yaml:
apiVersion: v1
kind: ReplicationController
metadata:
  name: myname
  labels:
    name: myname
spec:
  replicas: 2
  selector:
    name: myname
  template:
    metadata:
     labels:
       name: myname
    spec:
     containers:
     - name: myname
       image: helloWord
       imagePullPolicy: IfNotPresent
       ports:
       - containerPort: 8080

18.kubectl create -f xxxxx.yaml        19.kubectl get rc 20.kubectl get pods 21.kubectl describe pod helloworld-7jpm5 22.kubectl logs helloworld-7jpm5