Skip to content

Commit

Permalink
Upgrade to 1.11.2
Browse files Browse the repository at this point in the history
- Adds crictl which is now required by kubeadm
- Switch to google containers provided hyperkube image, since the coreos
  one isn't maintained anymore
  • Loading branch information
discordianfish committed Aug 23, 2018
1 parent 7220e57 commit 4b4476a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:sid

ENV KUBE_VERSION v1.10.1
ENV KUBE_VERSION v1.11.2
ENV KUBEADM_URL https://storage.googleapis.com/kubernetes-release/release/$KUBE_VERSION/bin/linux/amd64/kubeadm

RUN apt-get -qy update && apt-get -qy install curl make awscli golang-cfssl jq \
Expand Down
31 changes: 20 additions & 11 deletions kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ Parameters:

KubeVersion:
Type: String
Default: 1.10.3

KubeletImageTag:
Type: String
Default: v1.10.3_coreos.0
Default: v1.11.2

KubeadmFeatureGates:
Type: CommaDelimitedList
Expand All @@ -64,7 +60,7 @@ Parameters:

KubeadmVersion:
Type: String
Default: v1.10.3
Default: v1.11.2

KubeadmURLRoot:
Type: String
Expand All @@ -76,6 +72,11 @@ Parameters:
Description: No leading /
Default: bin/linux/amd64/kubeadm

CriCtlVersion:
Type: String
Description: crictl version
Default: v1.11.1

VPCID:
Description: Existing VPC with attached internet gateway to use for this cluster.
Type: AWS::EC2::VPC::Id
Expand Down Expand Up @@ -239,9 +240,13 @@ Mappings:
Type=oneshot
EnvironmentFile=/run/metadata/coreos
EnvironmentFile=/etc/kubernetes.env
Environment="PATH=/bin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/bin"
ExecStartPre=/bin/sh -c 'grep nodeName: /etc/kubernetes/controller.yaml \
&& exit 0; echo "nodeName: $COREOS_EC2_HOSTNAME" \
>> /etc/kubernetes/controller.yaml'
ExecStartPre=/bin/sh -c 'test -f /opt/bin/crictl && exit 0; \
curl -sfL "https://github.com/kubernetes-incubator/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-amd64.tar.gz" \
| tar -C /opt/bin/ -xzvf -'
ExecStart=/bin/sh -c 'while ! /opt/bin/kubeadm init --config /etc/kubernetes/controller.yaml \
--ignore-preflight-errors=KubeletVersion,Port-10250; do sleep 1; done'
ExecStartPost=/etc/etcd-signal-health
Expand Down Expand Up @@ -1114,11 +1119,15 @@ Resources:
Fn::Base64:
Fn::Sub:
- |
KUBELET_IMAGE_TAG=${KubeletImageTag}
KUBELET_IMAGE_TAG=${KubeVersion}
KUBELET_IMAGE_URL=docker://gcr.io/google-containers/hyperkube-amd64
KUBELET_API_SERVERS=api.${DomainName}
KUBELET_CLUSTER_DOMAIN=${DomainName}
- KubeletImageTag: !Ref KubeletImageTag
RKT_GLOBAL_ARGS="--insecure-options=image"
CRICTL_VERSION=${CriCtlVersion}
- KubeVersion: !Ref KubeVersion
DomainName: !Ref DomainName
CriCtlVersion: !Ref CriCtlVersion
cloudProviderConfig:
Fn::Base64:
Fn::Sub:
Expand Down Expand Up @@ -1265,7 +1274,7 @@ Resources:
assetBucket: !Ref assetBucket
VPCID: !Ref VPCID
PrivateSubnet: !Ref PrivateSubnetA
KubeletImageTag: !Ref KubeletImageTag
KubeVersion: !Ref KubeVersion

WorkerPoolDefaultB:
Type: "AWS::CloudFormation::Stack"
Expand All @@ -1281,7 +1290,7 @@ Resources:
assetBucket: !Ref assetBucket
VPCID: !Ref VPCID
PrivateSubnet: !Ref PrivateSubnetB
KubeletImageTag: !Ref KubeletImageTag
KubeVersion: !Ref KubeVersion

WorkerPoolDefaultC:
Type: "AWS::CloudFormation::Stack"
Expand All @@ -1297,7 +1306,7 @@ Resources:
assetBucket: !Ref assetBucket
VPCID: !Ref VPCID
PrivateSubnet: !Ref PrivateSubnetC
KubeletImageTag: !Ref KubeletImageTag
KubeVersion: !Ref KubeVersion

Outputs:
ControllerRole:
Expand Down
8 changes: 5 additions & 3 deletions templates/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Parameters:
DomainName:
Type: String

KubeletImageTag:
KubeVersion:
Type: String

Taints:
Expand Down Expand Up @@ -335,13 +335,15 @@ Resources:
Fn::Base64:
Fn::Sub:
- |
KUBELET_IMAGE_TAG=${KubeletImageTag}
KUBELET_IMAGE_URL=docker://gcr.io/google-containers/hyperkube-amd64
KUBELET_IMAGE_TAG=${KubeVersion}
KUBELET_API_SERVERS=api.${DomainName}
KUBELET_CLUSTER_DOMAIN=${DomainName}
KUBELET_TAINTS=${Taints}
KUBELET_FEATURE_GATES=${FeatureGates}
KUBELET_CPU_MANAGER_POLICY=${CPUManagerPolicy}
- KubeletImageTag: !Ref KubeletImageTag
RKT_GLOBAL_ARGS="--insecure-options=image"
- KubeVersion: !Ref KubeVersion
DomainName: !Ref DomainName
Taints: !Ref Taints
FeatureGates: !Ref FeatureGates
Expand Down

0 comments on commit 4b4476a

Please sign in to comment.