I hereby claim:
- I am akshedu on github.
- I am akshedu (https://keybase.io/akshedu) on keybase.
- I have a public key ASDmy--uZ1lCoHCwNM4BuguT8TsJ1JzE7WEQfcorQCJ6XQo
To claim this, I am signing this object:
#!/bin/sh | |
echo "Apply update cluster" | |
kops update cluster --yes | |
echo "Export kubectl config" | |
kops export kubecfg --admin | |
echo "Dry run rolling update" | |
kops rolling-update cluster |
clusterName: abcd.k8s.local | |
subnetCIDRb: | |
subnetCIDRa: | |
UtilitysubnetCIDRb: | |
UtilitysubnetCIDRa: | |
egressNAT: | |
APImaxSize: 2 | |
APIminSize: 1 | |
ModelmaxSize: 1 | |
ModelminSize: 1 |
externalPolicies: | |
node: | |
kubernetesVersion: 1.19.3 | |
awsRegion: | |
networkCIDR: | |
networkID: |
apiVersion: kops.k8s.io/v1alpha2 | |
kind: InstanceGroup | |
metadata: | |
labels: | |
kops.k8s.io/cluster: {{.clusterName}} | |
name: master-{{.awsRegion}}b | |
spec: | |
image: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20201026 | |
machineType: t2.medium | |
maxSize: 1 |
apiVersion: kops.k8s.io/v1alpha2 | |
kind: Cluster | |
metadata: | |
name: {{.clusterName}} | |
spec: | |
clusterAutoscaler: | |
enabled: true | |
skipNodesWithLocalStorage: false | |
skipNodesWithSystemPods: true | |
newPodScaleUpDelay: "60s" |
#!/bin/sh | |
echo "Check if cluster config exists on S3" | |
if ! kops get cluster; then | |
echo "Create SSH Key" | |
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa | |
echo "Create cluster config on S3" | |
kops create cluster --cloud aws --zones $AWS_ZONES | |
fi |
# Custom image with kops, kubectl and kustomize | |
image: 123456789123.dkr.ecr.ap-south-1.amazonaws.com/k8s:latest | |
stages: | |
- dryrun | |
- update | |
- roll | |
- addons | |
dryrun: |
stages: | |
- build | |
build_k8s: | |
stage: build | |
when: manual | |
image: | |
name: gcr.io/kaniko-project/executor:debug | |
entrypoint: ["/busybox/sh"] | |
script: |
# Use a builder layer while adding ecr-login to minimise the size of final image | |
FROM golang:alpine AS builder | |
RUN apk --no-cache add git && \ | |
git clone https://github.com/awslabs/amazon-ecr-credential-helper /go/src/github.com/awslabs/amazon-ecr-credential-helper && \ | |
go build -o /assets/docker-credential-ecr-login github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login | |
FROM alpine AS resource | |
COPY --from=builder /assets/docker-credential-ecr-login /usr/local/bin/docker-credential-ecr-login | |
# OpenSSH is required to create a ssh key while creating a new cluster |
I hereby claim:
To claim this, I am signing this object: