Skip to content

Commit

Permalink
Add boilerplate to shutdown script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jberlinsky committed Jan 5, 2019
1 parent b23a8e8 commit cd83d4b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/node_pool/data/shutdown-script.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#!/bin/bash -e

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

kubectl --kubeconfig=/var/lib/kubelet/kubeconfig drain --force=true --ignore-daemonsets=true --delete-local-data "$HOSTNAME"

0 comments on commit cd83d4b

Please sign in to comment.